#include <bits/stdc++.h>
using namespace std;
const int MAXN = 105;
const long long L = 1e9;
map<long long, pair<long long, long long> > mp;
int a[MAXN], b[MAXN], c[MAXN];
int n, nn;
long long ans, ans1, ans2;
void dfs1(int cur, long long t, long long x, long long y, long long z) {
  if (cur == nn + 1) {
    long long tmp = (y - x) * L + (z - y);
    if (mp.count(tmp))
      mp[tmp] = max(make_pair(x, t), mp[tmp]);
    else
      mp[tmp] = make_pair(x, t);
    return;
  }
  dfs1(cur + 1, t * 3 + 0, x + a[cur], y + b[cur], z);
  dfs1(cur + 1, t * 3 + 1, x + a[cur], y, z + c[cur]);
  dfs1(cur + 1, t * 3 + 2, x, y + b[cur], z + c[cur]);
}
void dfs2(int cur, long long t, long long x, long long y, long long z) {
  if (cur == n + 1) {
    long long tmp = (x - y) * L + (y - z);
    if (mp.count(tmp)) {
      pair<long long, long long> A = mp[tmp];
      if (A.first + x > ans) {
        ans = A.first + x;
        ans1 = A.second;
        ans2 = t;
      }
    }
    return;
  }
  dfs2(cur + 1, t * 3 + 0, x + a[cur], y + b[cur], z);
  dfs2(cur + 1, t * 3 + 1, x + a[cur], y, z + c[cur]);
  dfs2(cur + 1, t * 3 + 2, x, y + b[cur], z + c[cur]);
}
void print(long long x, int n) {
  if (n > 1) print(x / 3, n - 1);
  long long tmp = x % 3;
  if (tmp == 0) printf("LM\n");
  if (tmp == 1) printf("LW\n");
  if (tmp == 2) printf("MW\n");
}
void solve() {
  ans = -L;
  mp.clear();
  for (int i = 1; i <= n; ++i) {
    scanf("%d%d%d", &a[i], &b[i], &c[i]);
  }
  if (n == 1) {
    if (!a[1] && !b[1])
      printf("LM\n");
    else if (!a[1] && !c[1])
      printf("LW\n");
    else if (!b[1] && !c[1])
      printf("MW\n");
    else
      printf("Impossible\n");
    return;
  }
  nn = n / 2;
  dfs1(1, 0, 0, 0, 0);
  dfs2(nn + 1, 0, 0, 0, 0);
  if (ans == -L) {
    printf("Impossible\n");
    return;
  }
  print(ans1, nn);
  print(ans2, n - nn);
}
int main() {
  while (~scanf("%d", &n)) solve();
  return 0;
}
