func_code_string: #include <bits/stdc++.h>   #pragma comment(linker,  /STACK:100000000000000 )   using namespace std;   int n, l[30], m[30], w[30];   int tw[30], P1, P2;   map<pair<long long, long long>, pair<long long, long long> > mp;   long long best = -(1ll << 58), msk1, msk2;   void rec(int p, int msk, long long L, long long M, long long W) {     if (p == P1) {       pair<long long, long long> tmp = make_pair(L - M, L - W);       if (mp.find(tmp) == mp.end())         mp[tmp] = make_pair(L, msk);       else if (mp[tmp].first < L) {         mp[tmp] = make_pair(L, msk);       }       return;     }     rec(p + 1, msk * 3, L, M + m[p], W + w[p]);     rec(p + 1, msk * 3 + 1, L + l[p], M, W + w[p]);     rec(p + 1, msk * 3 + 2, L + l[p], M + m[p], W);   }   void rec2(int p, int msk, long long L, long long M, long long W) {     if (p == n) {       pair<long long, long long> tmp = make_pair(-(L - M), -(L - W));       if (mp.find(tmp) == mp.end()) return;       pair<long long, long long> tmp2 = mp[tmp];       long long sum = L + tmp2.first;       if (sum < best) return;       best = sum;       msk1 = tmp2.second;       msk2 = msk;       return;     }     rec2(p + 1, msk * 3, L, M + m[p], W + w[p]);     rec2(p + 1, msk * 3 + 1, L + l[p], M, W + w[p]);     rec2(p + 1, msk * 3 + 2, L + l[p], M + m[p], W);   }   void print(int x, int msk) {     if (x == 0) return;     print(x - 1, msk / 3);     if (msk % 3 == 0)       printf( MW n );     else if (msk % 3 == 1)       printf( LW n );     else       printf( LM n );   }   int main() {     for (int i = 0; i < 30; i++) tw[i] = 1 << i;     scanf( %d , &n);     for (int i = 0; i < n; i++) {       scanf( %d %d %d , &l[i], &m[i], &w[i]);     }     P1 = n / 2, P2 = n - P1;     rec(0, 0, 0, 0, 0);     rec2(P1, 0, 0, 0, 0);     if (best == -(1ll << 58))       printf( Impossible n );     else {       print(P1, msk1);       print(P2, msk2);     }     return 0;   }   