By João Vitor Martins, UECE Brazil
Adeildo do dentistry, but his real passion is for strings. It has several favorite strings. In one of his classes he met a colleague who is also a fan of strings, and that also has your favorite strings. He wondered if the strings have something in common. He asked you to find out whether two strings have the same amount of different substrings.
The first input row contains a T integer representing the number of test cases. Each test case consists of two lines. Each of the two lines has a non-empty string of size up to 100000, containing only lowercase letters of the alphabet.
For each test case print a line with "s" (without quotes) if the two strings have the same amount of different substrings and "n" otherwise.
Input Sample | Output Sample |
3 |
s |