#include <bits/stdc++.h>
using namespace std;
int w[30], m[30], l[30], arr[30], brr[30];
map<pair<int, int>, pair<int, int> > vst;
int find(int u, int n, int s1, int s2, int s3, int s) {
  if (u == n) {
    pair<int, int> p = make_pair(s2 - s1, s3 - s1);
    if (vst.count(p) && vst[p].first >= s1 + s2 + s3) return 0;
    vst[p] = make_pair(s1 + s2 + s3, s);
    return 0;
  }
  find(u + 1, n, s1, s2 + m[u], s3 + w[u], s * 3);
  find(u + 1, n, s1 + l[u], s2, s3 + w[u], s * 3 + 1);
  find(u + 1, n, s1 + l[u], s2 + m[u], s3, s * 3 + 2);
  return 0;
}
int mx_ans = -0x3f3f3f3f;
int p1, p2;
int re_find(int u, int n, int s1, int s2, int s3, int s) {
  if (u >= n) {
    pair<int, int> p = make_pair(s1 - s2, s1 - s3);
    if (!vst.count(p)) return 0;
    if (s1 + s2 + s3 + vst[p].first > mx_ans) {
      mx_ans = s1 + s2 + s3 + vst[p].first;
      p1 = vst[p].second, p2 = s;
    }
    return 0;
  }
  re_find(u + 1, n, s1, s2 + m[u], s3 + w[u], s * 3);
  re_find(u + 1, n, s1 + l[u], s2, s3 + w[u], s * 3 + 1);
  re_find(u + 1, n, s1 + l[u], s2 + m[u], s3, s * 3 + 2);
  return 0;
}
char chr[3][3] = {"MW", "LW", "LM"};
int main() {
  int N, M;
  cin >> N;
  if (N > 10)
    M = (N + 1) / 2;
  else
    M = N / 2;
  for (int i = 0; i < N; i++) scanf("%d%d%d", l + i, m + i, w + i);
  find(0, M, 0, 0, 0, 0);
  re_find(M, N, 0, 0, 0, 0);
  if (mx_ans == -0x3f3f3f3f)
    puts("Impossible");
  else {
    for (int i = 0; i < M; i++) {
      arr[i] = p1 % 3;
      p1 /= 3;
    }
    for (int i = 0; i < N - M; i++) {
      brr[i] = p2 % 3;
      p2 /= 3;
    }
    for (int i = M - 1; i >= 0; i--) puts(chr[arr[i]]);
    for (int i = N - M - 1; i >= 0; i--) puts(chr[brr[i]]);
  }
  return 0;
}
