#include <bits/stdc++.h>   using namespace std;   const int nmax = 26;   int cost[nmax][3];   const int l = 0, m = 1, w = 2;   map<pair<int, int>, pair<string, int> > myMap;   pair<string, long long> global;   bool ok = 0;   void firstHalf(int a, int b, int c, string s) {     if (myMap.count({a - b, b - c}) == 0 || myMap[{a - b, b - c}].second < a) {       myMap[{a - b, b - c}] = {s, a};     }   }   void findMatch(int a, int b, int c, string s) {     if (myMap.count({b - a, c - b}) != 0) {       int ans = myMap[{b - a, c - b}].second + a;       string fin = myMap[{b - a, c - b}].first + s;       if (ans > global.second) {         ok = 1;         global = {fin, ans};       }     }   }   void solve(int i, const int stop, void (*op)(int, int, int, string), int a,              int b, int c, string s) {     if (i == stop + 1) {       op(a, b, c, s);       return;     }     solve(i + 1, stop, op, a + cost[i][l], b + cost[i][m], c, s +  LM n );     solve(i + 1, stop, op, a + cost[i][l], b, c + cost[i][w], s +  LW n );     solve(i + 1, stop, op, a, b + cost[i][m], c + cost[i][w], s +  MW n );   }   int main() {     int n;     cin >> n;     for (int i = 1; i <= n; ++i) cin >> cost[i][l] >> cost[i][m] >> cost[i][w];     global.second = -26 * 10e7;     string pl;     solve(1, n / 2, &firstHalf, 0, 0, 0, pl);     solve(n / 2 + 1, n, &findMatch, 0, 0, 0, pl);     if (ok)       cout << global.first;     else       cout <<  Impossible ;   }   