#include #define rep(i, a) for (int i = 0; i < (a); i++) #define rep2(i, a, b) for (int i = (a); i < (b); i++) #define repr(i, a) for (int i = (a) - 1; i >= 0; i--) #define repr2(i, a, b) for (int i = (b) - 1; i >= (a); i--) #define itall(a) a.begin(), a.end() using namespace std; typedef long long ll; const ll inf = 1e9; const ll mod = 1e9 + 7; const double pi = acos(-1); const double eps = 1e-8; template inline T sq(T a) { return a * a; } template inline T cb(T a) { return a * a * a; } template inline bool umin(T &a, const T &b) { return b < a && (a = b, true); } template inline bool umax(T &a, const T &b) { return a < b && (a = b, true); } int dp[200000]; int N, K; int grundy(int k) { if (dp[k] >= 0) return dp[k]; if (k >= N - 1) return dp[k] = 0; set s; rep (i, K) { if (k + i + 1 <= N) { s.insert(grundy(k + i + 1)); } } int res = 0; while (s.count(res)) res++; return dp[k] = res; } int main() { int P; cin >> P; rep (i, P) { cin >> N >> K; memset(dp, -1, sizeof(dp)); if (grundy(0) == 0) { cout << "Lose" << endl; } else { cout << "Win" << endl; } } }