A. Artifact to print
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output

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.

Input

A line with a string formed by ten uppercase letters.

Output

A line with the uppercase letter "S" if she can achieve her goal, or the uppercase letter "N" otherwise.

Examples
Input
CONTRAPELO
Output
S
Input
XATPTKABPB
Output
S
Input
XATPTPKABB
Output
N