#include <bits/stdc++.h>
using namespace std;
const int N = 31, MAXS = 2000001;
struct Pair {
  long long d;
  int a, state;
} s[MAXS];
long long ds[MAXS];
int a[N], b[N], c[N];
int n, sz;
int ans, st1, st2;
void dfs1(int i, int sa, int sb, int sc, int state) {
  if (i >= n / 2) {
    s[sz].d = ((long long)sb - sa) * (1LL << 30) + (sc - sa);
    s[sz].a = sa;
    s[sz++].state = state;
    return;
  }
  dfs1(i + 1, sa + a[i], sb + b[i], sc, state * 3);
  dfs1(i + 1, sa + a[i], sb, sc + c[i], state * 3 + 1);
  dfs1(i + 1, sa, sb + b[i], sc + c[i], state * 3 + 2);
}
void dfs2(int i, int sa, int sb, int sc, int state) {
  if (i >= n) {
    long long dt = ((long long)sa - sb) * (1LL << 30) + (sa - sc);
    if (dt < ds[0] || dt > ds[sz - 1]) return;
    int p = lower_bound(ds, ds + sz, dt) - ds;
    if (ds[p] == dt) {
      if (s[p].a + sa > ans) {
        ans = s[p].a + sa;
        st1 = s[p].state;
        st2 = state;
      }
    }
    return;
  }
  dfs2(i + 1, sa + a[i], sb + b[i], sc, state * 3);
  dfs2(i + 1, sa + a[i], sb, sc + c[i], state * 3 + 1);
  dfs2(i + 1, sa, sb + b[i], sc + c[i], state * 3 + 2);
}
bool cmp(Pair a, Pair b) { return (a.d < b.d) || (a.d == b.d && a.a > b.a); }
void print(int state, int l) {
  if (l > 1) print(state / 3, l - 1);
  state %= 3;
  if (state == 0) puts("LM");
  if (state == 1) puts("LW");
  if (state == 2) puts("MW");
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d%d%d", &a[i], &b[i], &c[i]);
  dfs1(0, 0, 0, 0, 0);
  sort(s, s + sz, cmp);
  for (int i = 0; i < sz; i++) ds[i] = s[i].d;
  ans = -(1 << 30);
  dfs2(n / 2, 0, 0, 0, 0);
  if (ans == -(1 << 30))
    puts("Impossible");
  else {
    if (n / 2) print(st1, n / 2);
    print(st2, n - n / 2);
  }
  return 0;
}
