Forgot Password ?
New password will be sent to following email id
Buddy and Table Tennis
Problem Code : BDDYTT
2 0000000100100 10011110111001101
Time Limit :
C , C++ , Java , Python 2
Login to submit your response.
Buddy likes to play table tennis. He found some statistics of matches which described who won the points in order. A game shall be won by the player first scoring 11 points except in the case when both players have 10 points each, then the game shall be won by the first player subsequently gaining a lead of 2 points. Could you please help the Buddy find out who the winner was from the given statistics? (It is guaranteed that statistics represent always a valid, finished match.)
First line contains an integer <b>T</b> denoting number of test cases.<br> Next <b>N</b> line contains a binary string <b>S</b> which describes a match. <b>'0'</b> means Buddy lose a point, whereas <b>'1'</b> means he won the point.
For each test case, output on a separate line a string describing who won the match. If Buddy won then print <b>"WIN"</b> (without quotes), otherwise print <b>"LOSE"</b> (without quotes).
1 ≤ <b>T</b> ≤ 1000<br> 1 ≤ <b>length(S)</b> ≤ 100