#include <bits/stdc++.h>
using namespace std;
int pow_3[14];
int n;
map<pair<int, int>, pair<int, int>> M;
int l[30], m[30], w[30];
int main() {
  pow_3[0] = 1;
  for (int i = 1; i < 14; ++i) pow_3[i] = pow_3[i - 1] * 3;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d%d%d", l + i, m + i, w + i);
  int h0(n / 2), h1(n - h0);
  for (int i = 0; i < pow_3[h0]; ++i) {
    int sl(0), sm(0), sw(0);
    int a(i);
    for (int j = 0; j < h0; ++j) {
      switch (a % 3) {
        case 0:
          sm += m[j], sw += w[j];
          break;
        case 1:
          sl += l[j], sw += w[j];
          break;
        case 2:
          sl += l[j], sm += m[j];
          break;
      }
      a /= 3;
    }
    auto tp(make_pair(sm - sl, sw - sl));
    auto it(M.find(tp));
    if (it == M.end())
      M.emplace(tp, make_pair(sl, i));
    else {
      if (sl > it->second.first) it->second = {sl, i};
    }
  }
  int maxx(INT_MIN);
  int r1(-1), r2(-1);
  for (int i = 0; i < pow_3[h1]; ++i) {
    int sl(0), sm(0), sw(0);
    int a(i);
    for (int j = h0; j < n; ++j) {
      switch (a % 3) {
        case 0:
          sm += m[j], sw += w[j];
          break;
        case 1:
          sl += l[j], sw += w[j];
          break;
        case 2:
          sl += l[j], sm += m[j];
          break;
      }
      a /= 3;
    }
    auto it(M.find(make_pair(sl - sm, sl - sw)));
    if (it != M.end()) {
      int psl, pi;
      tie(psl, pi) = it->second;
      if (sl + psl > maxx) {
        maxx = sl + psl;
        r1 = pi, r2 = i;
      }
    }
  }
  if (r1 == -1)
    puts("Impossible");
  else {
    for (int j = 0; j < h0; ++j) {
      switch (r1 % 3) {
        case 0:
          puts("MW");
          break;
        case 1:
          puts("LW");
          break;
        case 2:
          puts("LM");
          break;
      }
      r1 /= 3;
    }
    for (int j = 0; j < h1; ++j) {
      switch (r2 % 3) {
        case 0:
          puts("MW");
          break;
        case 1:
          puts("LW");
          break;
        case 2:
          puts("LM");
          break;
      }
      r2 /= 3;
    }
  }
  return 0;
}
