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