func_code_string: #include <bits/stdc++.h>   using namespace std;   int N;   int A[3][30];   int p3[30];   map<pair<int, int>, pair<int, signed long long> > M[2];   void solve() {     int i, j, k, l, r, x, y;     string s;     cin >> N;     p3[0] = 1;     for (i = 0; i < N; i++) p3[i + 1] = p3[i] * 3;     for (i = 0; i < N; i++) cin >> A[0][i] >> A[1][i] >> A[2][i];     for (signed long long mask = 0; mask < p3[min(N, 13)]; mask++) {       int t[3] = {}, tm = mask;       for (i = 0; i < min(N, 13); i++) {         x = tm % 3, tm /= 3;         if (x == 0) t[0] += A[0][i], t[1] += A[1][i];         if (x == 1) t[0] += A[0][i], t[2] += A[2][i];         if (x == 2) t[1] += A[1][i], t[2] += A[2][i];       }       M[0][{t[0] - t[1], t[0] - t[2]}] =           max(M[0][{t[0] - t[1], t[0] - t[2]}], {t[0] + (1LL << 29), mask});     }     for (signed long long mask = 0; mask < p3[max(0, N - 13)]; mask++) {       int t[3] = {}, tm = mask;       for (i = 0; i < max(0, N - 13); i++) {         x = tm % 3, tm /= 3;         if (x == 0) t[0] += A[0][13 + i], t[1] += A[1][13 + i];         if (x == 1) t[0] += A[0][13 + i], t[2] += A[2][13 + i];         if (x == 2) t[1] += A[1][13 + i], t[2] += A[2][13 + i];       }       M[1][{t[1] - t[0], t[2] - t[0]}] = max(M[1][{t[1] - t[0], t[2] - t[0]}],                                              {t[0] + (1LL << 29), mask * p3[13]});     }     signed long long co = -1LL << 40;     signed long long best = -1;     for (auto& r : M[1])       if (M[0].count(r.first) && r.second.first + M[0][r.first].first > co) {         co = r.second.first + M[0][r.first].first;         best = r.second.second + M[0][r.first].second;       }     if (best == -1)       (void)printf( Impossible n );     else {       for (i = 0; i < N; i++) {         x = best % 3;         best /= 3;         if (x == 0) (void)printf( LM n );         if (x == 1) (void)printf( LW n );         if (x == 2) (void)printf( MW n );       }     }   }   int main(int argc, char** argv) {     string s;     int i;     if (argc == 1) ios::sync_with_stdio(false);     for (i = 0; i < argc - 1; i++) s += argv[i + 1], s +=   n ;     for (i = 0; i < s.size(); i++) ungetc(s[s.size() - 1 - i], stdin);     solve();     return 0;   }   