
ZOJ Problem Set  3452
Doraemon is playing a game with Dorami. Initially there are piles of stones on the table. Each pile consists of at most 2 stones. Each stone may be black or white. Doraemon and Dorami take turn to take away the stones, the rule is as follows:
Now the piles of stones on the table are known, Doraemon wants to know if he can win. Can you help him? Input
There are multiple cases (about 45000). OutputFor each case, output two words separated by a space in one line. The first word should be "win" if Doraemon can win the game if he makes move first, otherwise it should be "lose". The second word should be "win" if Doraemon can win the game if Dorami makes move first, otherwise it should be "lose". Sample Input2 w 1 b 1 2 b 1 wb 1 Sample Outputlose win lose lose Author: ZHOU, Yilun Contest: ZOJ Monthly, December 2010 