#include #define rep(i, n) for(long long i = 0; i < n; i++) #define ALL(v) (v).begin(), (v).end() using namespace std; using lint = long long; int dp[120010]; int main() { int p; cin >> p; while (p--) { int n, k; cin >> n >> k; for (int i = 0; i < n; i++) { dp[i] = -1; } auto f = [&](auto f, int x) -> int { if (dp[x] != -1) { return dp[x]; } int res = 0; for (int i = 1; i <= k; i++) { if (i + x >= n) { break; } if (f(f, i + x) == 0) { res = 1; } } dp[x] = res; return res; }; cout << (f(f, 0) ? "Win" : "Lose") << endl; } }