func_code_string: #include <bits/stdc++.h>   using namespace std;   vector<int> P[2];   int n;   int mark[100011];   int cnt[100011];   int cor(int p, int n) { return 2 * n + p; }   int main() {     int k, x;     cin >> n;     for (int i = 0; i < 2; i++) {       cin >> k;       for (int j = 0; j < k; j++) {         cin >> x;         P[i].push_back(x);       }     }     mark[cor(0, 0)] = mark[cor(1, 0)] = 2;     queue<int> Q;     Q.push(cor(0, 0));     Q.push(cor(1, 0));     while (Q.size()) {       int v = Q.front();       Q.pop();       if (mark[v] == 2) {         int p = v % 2;         v /= 2;         int val;         for (auto x : P[1 - p]) {           val = (v - x + 2 * n) % n;           x = cor(1 - p, val);           if (!mark[x]) {             mark[x] = 1;             Q.push(x);           }         }         continue;       }       int p = v % 2;       v /= 2;       int val;       for (auto x : P[1 - p]) {         val = (v - x + 2 * n) % n;         x = cor(1 - p, val);         cnt[x]++;         if (mark[x] == 0 and cnt[x] == P[x % 2].size()) {           Q.push(x);           mark[x] = 2;         }       }     }     for (int i = 1; i < n; i++) {       x = mark[cor(0, i)];       if (x == 1) {         cout <<  Win  ;       } else if (x == 2) {         cout <<  Lose  ;       } else {         cout <<  Loop  ;       }     }     cout <<   n ;     for (int i = 1; i < n; i++) {       x = mark[cor(1, i)];       if (x == 1) {         cout <<  Win  ;       } else if (x == 2) {         cout <<  Lose  ;       } else {         cout <<  Loop  ;       }     }   }   