Sara has a very old printing press. Adding letters to the press is very difficult, so she wants to avoid doing it. At the moment, there is a line with ten letters in the press. She wants to remove some of the letters (without changing their order) so that the word TAP remains.
For example, if she has
she can achieve this by removing the lighter letters, leaving only the underlined ones. The same applies to
However, she cannot achieve her goal with
Your task is to determine if she can achieve her goal.
A line with a string formed by ten uppercase letters.
A line with the uppercase letter "S" if she can achieve her goal, or the uppercase letter "N" otherwise.
CONTRAPELO
S
XATPTKABPB
S
XATPTPKABB
N
| Name |
|---|


