class A def initialize p = gets.chomp.to_i p.times do n, k = gets.chomp.split(' ').map(&:to_i) if n <= k || ((n-1) % (k+1)) != 0 puts 'Win' else puts 'Lose' end end end end A.new