#K84852. Rearrange String Game

    ID: 36511 Type: Default 1000ms 256MiB

Rearrange String Game

Rearrange String Game

In this problem, you are given several pairs of strings. For each pair, determine if one string can be rearranged to match the other. Two strings can be rearranged to match if and only if they are anagrams of each other. Formally, for two strings \(s_1\) and \(s_2\), they are anagrams if \(sorted(s_1) = sorted(s_2)\). Based on this, for each test case, output "WIN" if the two strings are anagrams, otherwise output "LOSE".

The input will consist of an integer \(T\) denoting the number of test cases, followed by \(T\) lines; each line contains two strings separated by spaces. The output for each test case should be printed on a separate line.

inputFormat

The first line contains a single integer \(T\) (\(1 \leq T \leq 10^5\)), the number of test cases.
Each of the following \(T\) lines contains two non-empty strings separated by a space. The strings consist of lowercase English letters.

outputFormat

For each test case, output a single line containing either "WIN" if the strings can be rearranged to match each other, or "LOSE" otherwise.

## sample
2
listen silent
hello world
WIN

LOSE

</p>