func_code_string: #include <bits/stdc++.h>   using namespace std;   queue<pair<int, int> > q;   int n, s[3][7005], f[3][7005], k[3], dd[3][7005];   int main() {     ios::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     cin >> n;     for (int i = 1; i <= 2; i++) {       cin >> k[i];       for (int j = 1; j <= k[i]; j++) cin >> s[i][j];     }     memset(f, 0, sizeof f);     q.push(pair<int, int>(1, 0));     q.push(pair<int, int>(2, 0));     f[1][0] = 1;     f[2][0] = 1;     while (!q.empty()) {       int t = q.front().first;       int u = q.front().second;       q.pop();       if (f[t][u] == 1) {         for (int i = 1; i <= k[3 - t]; i++) {           int v = (u + n - s[3 - t][i]) % n;           if (f[3 - t][v] > 0) continue;           f[3 - t][v] = 2;           q.push(pair<int, int>(3 - t, v));         }       } else {         for (int i = 1; i <= k[3 - t]; i++) {           int v = (u + n - s[3 - t][i]) % n;           if (f[3 - t][v] > 0) continue;           ++dd[3 - t][v];           if (dd[3 - t][v] == k[3 - t]) {             f[3 - t][v] = 1;             q.push(pair<int, int>(3 - t, v));           }         }       }     }     for (int i = 1; i <= 2; i++) {       for (int j = 1; j <= n - 1; j++) {         if (f[i][j] < 1) cout <<  Loop  ;         if (f[i][j] == 1) cout <<  Lose  ;         if (f[i][j] > 1) cout <<  Win  ;       }       cout <<   n ;     }     return 0;   }   