def f() n,m=gets.split(" ").map{|e| e.to_i} dp=Array.new(n+1,0) dp[1]=1 s1=1 2.upto(n){|i| if s1>0 then dp[i]=0 else dp[i]=1 end s1+=dp[i] if i-m>0 then s1-=dp[i-m] end } puts (dp[n]==1)?("Lose"):("Win") end n=gets.to_i n.times{ f() }