#include <bits/stdc++.h>
using namespace std;
int n;
int l[25], m[25], w[25];
map<pair<int, int>, pair<int, long long>> met;
int parsa;
long long parmask1, parmask2;
int res[25];
void meet1(int a, int b, int c, long long mask, int ind, int raja) {
  if (ind == raja) {
    pair<int, int> p = make_pair(b - a, c - b);
    if (!(met.count(p)) || met[p].first < a) {
      met[p] = make_pair(a, mask);
    }
    return;
  }
  meet1(a + l[ind], b + m[ind], c, 3 * mask, ind + 1, raja);
  meet1(a + l[ind], b, c + w[ind], 3 * mask + 1, ind + 1, raja);
  meet1(a, b + m[ind], c + w[ind], 3 * mask + 2, ind + 1, raja);
}
void meet2(int a, int b, int c, long long mask, int ind) {
  if (ind == n) {
    pair<int, int> p = make_pair(a - b, b - c);
    if (met.count(p)) {
      if (met[p].first + a > parsa) {
        parsa = met[p].first + a;
        parmask1 = met[p].second;
        parmask2 = mask;
      }
    }
    return;
  }
  meet2(a + l[ind], b + m[ind], c, 3 * mask, ind + 1);
  meet2(a + l[ind], b, c + w[ind], 3 * mask + 1, ind + 1);
  meet2(a, b + m[ind], c + w[ind], 3 * mask + 2, ind + 1);
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> l[i] >> m[i] >> w[i];
  }
  int raja1 = n / 2;
  meet1(0, 0, 0, 0, 0, raja1);
  int raja2 = n - raja1;
  parsa = -100000000;
  parmask1 = -1;
  meet2(0, 0, 0, 0, raja1);
  if (parmask1 == -1) {
    cout << "Impossible\n";
    return 0;
  }
  for (int i = 0; i < raja2; i++) {
    res[i] = parmask2 % 3;
    parmask2 /= 3;
  }
  for (int i = raja2; i < n; i++) {
    res[i] = parmask1 % 3;
    parmask1 /= 3;
  }
  for (int i = n - 1; i >= 0; i--) {
    if (res[i] == 0) cout << "LM\n";
    if (res[i] == 1) cout << "LW\n";
    if (res[i] == 2) cout << "MW\n";
  }
}
