#include <bits/stdc++.h>
using namespace std;
const long long N = 26;
const long long MAX = 5 * 1e6;
const long long INF = 1e15;
long long l[N], m[N], w[N], n, nc, sz, szc;
long long a[MAX][3], b[MAX][3];
long long loc1 = -1, loc2;
map<pair<long long, long long>, long long> ma;
void solve() {
  for (int i = 0; i < n; i++) cin >> l[i] >> m[i] >> w[i];
  memset(a, 0, sizeof(a));
  sz = 1;
  for (int i = 0; i < n; i++) {
    long long p = 0, q = sz, r = 2 * sz, s = 3 * sz;
    for (int j = q; j < s; j++)
      for (int k = 0; k < 3; k++) a[j][k] = a[j - sz][k];
    for (int j = p; j < q; j++) a[j][0] += l[i], a[j][1] += m[i];
    for (int j = q; j < r; j++) a[j][2] += w[i], a[j][1] += m[i];
    for (int j = r; j < s; j++) a[j][0] += l[i], a[j][2] += w[i];
    sz = sz * 3;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  long long nf = n / 2, ns = n - n / 2;
  nc = n - n / 2;
  n = n / 2;
  solve();
  for (int i = 0; i < sz; i++) {
    if (ma.find(make_pair(a[i][0] - a[i][1], a[i][0] - a[i][2])) != ma.end()) {
      ma[make_pair(a[i][0] - a[i][1], a[i][0] - a[i][2])] =
          max(a[i][0], ma[make_pair(a[i][0] - a[i][1], a[i][0] - a[i][2])]);
    } else
      ma[make_pair(a[i][0] - a[i][1], a[i][0] - a[i][2])] = a[i][0];
  }
  n = nc;
  long long szi = sz;
  memcpy(b, a, sizeof(a));
  solve();
  long long ans = INF;
  ans *= -1;
  long long ac[2][3];
  for (int i = 0; i < sz; i++) {
    long long p = a[i][0], q = a[i][1], r = a[i][2];
    q = p - q;
    q *= -1;
    r = p - r;
    r *= -1;
    if (ma.find(make_pair(q, r)) != ma.end()) {
      if (p + ma[make_pair(q, r)] > ans) {
        ans = p + ma[make_pair(q, r)];
        ac[0][0] = ma[make_pair(q, r)];
        ac[0][1] = q;
        ac[0][2] = r;
        ac[1][0] = p;
        ac[1][1] = -1 * q;
        ac[1][2] = -1 * r;
        loc2 = i;
      }
    }
  }
  for (int i = 1; i < 3; i++) {
    ac[0][i] = ac[0][0] - ac[0][i];
    ac[1][i] = ac[1][0] - ac[1][i];
  }
  for (int i = 0; i < szi; i++) {
    long long flag = 1;
    for (int j = 0; j < 3; j++)
      if (b[i][j] != ac[0][j]) flag = 0;
    if (flag) {
      loc1 = i;
      break;
    }
  }
  long long l1, l2;
  l1 = loc1, l2 = loc2;
  vector<long long> v;
  while (nf--) {
    v.push_back(loc1 % 3);
    loc1 /= 3;
  }
  while (ns--) {
    v.push_back(loc2 % 3);
    loc2 /= 3;
  }
  if (ans == -1 * INF)
    cout << "Impossible";
  else {
    for (long long i : v) {
      if (i == 0) cout << "LM";
      if (i == 1) cout << "MW";
      if (i == 2) cout << "LW";
      cout << endl;
    }
  }
}
