#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 25;
const int INF = 1 << 30;
const char ss[3][4] = {"MW", "LW", "LM"};
int as[MAX_N][3];
map<pair<int, int>, pair<int, int> > mp0, mp1;
void calc(map<pair<int, int>, pair<int, int> > &mp, int h, int bs[][3]) {
  int hbits = 1;
  for (int i = 0; i < h; i++) hbits *= 3;
  for (int bits = 0; bits < hbits; bits++) {
    int sums[3] = {0, 0, 0};
    for (int i = 0, r = bits; i < h; i++, r /= 3) switch (r % 3) {
        case 0:
          sums[1] += bs[i][1], sums[2] += bs[i][2];
          break;
        case 1:
          sums[2] += bs[i][2], sums[0] += bs[i][0];
          break;
        case 2:
          sums[0] += bs[i][0], sums[1] += bs[i][1];
          break;
      }
    int a = sums[0], b = sums[1] - a, c = sums[2] - a;
    pair<int, int> p(b, c);
    map<pair<int, int>, pair<int, int> >::iterator mit = mp.find(p);
    if (mit == mp.end())
      mp[p] = pair<int, int>(a, bits);
    else if (mit->second.first < a)
      mit->second = pair<int, int>(a, bits);
  }
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < 3; j++) scanf("%d", as[i] + j);
  int h0 = n / 2, h1 = n - h0;
  calc(mp0, h0, as);
  calc(mp1, h1, as + h0);
  int maxd = -INF, mbs0 = 0, mbs1 = 0;
  for (map<pair<int, int>, pair<int, int> >::iterator mit0 = mp0.begin();
       mit0 != mp0.end(); mit0++) {
    const pair<int, int> &p = mit0->first;
    map<pair<int, int>, pair<int, int> >::iterator mit1 =
        mp1.find(pair<int, int>(-p.first, -p.second));
    if (mit1 != mp1.end()) {
      int d = mit0->second.first + mit1->second.first;
      if (maxd < d)
        maxd = d, mbs0 = mit0->second.second, mbs1 = mit1->second.second;
    }
  }
  if (maxd <= -INF)
    puts("Impossible");
  else {
    for (int i = 0; i < h0; i++, mbs0 /= 3) puts(ss[mbs0 % 3]);
    for (int i = 0; i < h1; i++, mbs1 /= 3) puts(ss[mbs1 % 3]);
  }
  return 0;
}
