#include #include bool solve(const int n, const int k) { bool dp[n+100]; for (int i = 2; i < k+2; i++) { dp[i] = true; } for (int i = k+2; i < n+1; i++) { dp[i] = false; for (int j = 1; j < k+1; j++) { dp[i] |= !dp[i-j]; if (dp[i]) break; } } return dp[n]; } int main(int argc, char const* argv[]) { int p; std::cin >> p; std::vector n(p), k(p); for (int i = 0; i < p; i++) { std::cin >> n[i] >> k[i]; } for (int i = 0; i < p; i++) { if (solve(n[i], k[i])) { std::cout << "Win" << std::endl; } else { std::cout << "Lose" << std::endl; } } return 0; }