Yubin got a time limit exceeded verdict on the judge, and decided to work out the time complexity by hand.
The judge performs 108 operations per second. With a time limit of L seconds it allows 108×L operations in total.
Suppose a program has time complexity f(N), the input size is at most N, and there are T test cases. The program then performs f(N)×T operations. If that number is greater than the allowed number of operations, the program exceeds the time limit. Otherwise it may pass.
Report the verdict for each situation.
The first line contains the number of situations C. (1≤C≤100)
Each of the next C lines contains a string S describing the time complexity, the maximum input size N, the number of test cases T, and the time limit L in seconds, separated by spaces. (1≤N≤106, 1≤T≤10, 1≤L≤10, and N, T, L are integers)
S is one of the following five strings, written without spaces.
O(N): f(N)=NO(N^2): f(N)=N2O(N^3): f(N)=N3O(2^N): f(N)=2NO(N!): f(N)=N!Print one line per situation. Print TLE! if the program exceeds the time limit, and May Pass. otherwise.