#include <bits/stdc++.h>
using namespace std;
int l[30], m[30], w[30], n, ans, flag, ans1[30], a[30];
long long g[30], pos;
map<pair<int, int>, int> mp, mp1;
void dfs(int x, int X, int L, int M, int W, long long t) {
  if (x > X) {
    int p1 = L - M, p2 = L - W;
    if (mp.find(pair<int, int>(p1, p2)) == mp.end())
      mp[pair<int, int>(p1, p2)] = L, mp1[pair<int, int>(p1, p2)] = t;
    else if (mp[pair<int, int>(p1, p2)] < L) {
      mp[pair<int, int>(p1, p2)] = L;
      mp1[pair<int, int>(p1, p2)] = t;
    }
    return;
  }
  dfs(x + 1, X, L + l[x], M + m[x], W, t * 3);
  dfs(x + 1, X, L + l[x], M, W + w[x], t * 3 + 1);
  dfs(x + 1, X, L, M + m[x], W + w[x], t * 3 + 2);
}
void dfs1(int x, int X, int L, int M, int W, long long t) {
  if (x > X) {
    int p1 = L - M, p2 = L - W;
    if (mp.find(pair<int, int>(-p1, -p2)) != mp.end())
      if (flag == 0 || L + mp[pair<int, int>(-p1, -p2)] > ans) {
        flag = 1;
        ans = L + mp[pair<int, int>(-p1, -p2)];
        pos = mp1[pair<int, int>(-p1, -p2)] * g[n - n / 2] + t;
      }
    return;
  }
  dfs1(x + 1, X, L + l[x], M + m[x], W, t * 3);
  dfs1(x + 1, X, L + l[x], M, W + w[x], t * 3 + 1);
  dfs1(x + 1, X, L, M + m[x], W + w[x], t * 3 + 2);
}
int main() {
  g[0] = 1;
  for (int i = 1; i <= 14; i++) g[i] = g[i - 1] * 3;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d%d", &l[i], &m[i], &w[i]);
  }
  dfs(1, n / 2, 0, 0, 0, 0);
  dfs1(n / 2 + 1, n, 0, 0, 0, 0);
  if (flag == 0)
    printf("Impossible\n");
  else {
    cerr << ans << endl;
    for (int i = n; i >= 1; i--) ans1[i] = pos % 3, pos /= 3;
    for (int i = 1; i <= n; i++) {
      if (ans1[i] == 0) printf("LM\n");
      if (ans1[i] == 1) printf("LW\n");
      if (ans1[i] == 2) printf("MW\n");
    }
  }
}
