Your friend Gassassini Pianini is learning to play the piano. He has a piano at home with a standard layout of 88 keys:

\begin{center}
\includegraphics{out-of-bounds-piano_pictures-2.ps}
\end{center}

In this problem, we will only be interested in the 52 white keys. They are named consecutively with the letters of the English alphabet A--G in a cycle of length seven (called an \textit{octave}), as shown in the image.

Gassassini Pianini has obtained the scores of several musical pieces by the violinist Paganini and wants to transpose them for the piano. For each piece, he has already decoded the musical notation and obtained a string of letters A--G that constitutes the melody. Now he wants to play the pieces on the piano, and he does not care from which octave a particular note is taken: for example, if the string indicates that the next note is A, he will be satisfied with any of the eight A notes available on the piano.

The problem is that Gassassini Pianini is still inexperienced and cannot stretch his fingers too wide. He can choose the first note freely (from the available keys with the required letter); however, for each subsequent note, he can only play one that is at most three keys away from the previous one in either direction. For example, suppose the last note played was the dark gray D in the illustration above; then the next note can either be exactly that same D or one of the six light gray notes in its vicinity.

You are given string transcriptions of several musical pieces that interest Gassassini Pianini; determine whether he will be able to play them or if he needs to practice finger positioning.