Bob is an internet addict and has accounts on many websites. Lately, he has become worried about his accounts being hacked and hence wants to assess the strength of all his passwords. In total, Bob has accounts on N websites and the password on ith website is Pi ( 1 ≤ i ≤ N). He considers a password to be of high strength if it does not contain a substring of length atleast 2 which is a palindrome. Bob does not want to check all the passwords manually, so he wants to write a computer program for it, but he does not know how to do it. So, can you write a program for him ?
Input:
First line consists of a single integer N, the number of websites Bob has an account on.
N lines follow. Each of these lines consists of a string of lowercase english letters. ith line represents Pi.
Output:
Print N lines.
On the ith line, print "STRONG", if the ith password has high strength otherwise print "WEAK", without inverted commas.
Constraints:
1 ≤ N ≤ 100
2 ≤ |Pi| ≤ 105
Passwords consist only of lowercase english letters.