import java.util.Scanner; public class No8 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int p = sc.nextInt(); for (int i = 0; i < p; i++) { int n = sc.nextInt(); int k = sc.nextInt(); System.out.println( n % (k + 1) != 1?"win":"lose"); } } }