#include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000000LL;
struct node {
  int x, y, z;
} E[35];
map<pair<int, int>, int> mp, rmp;
string op[35];
long long change(pair<int, int> a) {
  return 2 * INF * (a.first + INF) + a.second + INF;
}
void dfs(int v, int n, int x, int y, int z, map<pair<int, int>, int>& mp) {
  if (v == n) {
    pair<int, int> p = pair<int, int>(y - x, z - x);
    if (mp.find(p) == mp.end() || mp[p] < x) mp[p] = x;
    return;
  }
  dfs(v + 1, n, x + E[v].x, y + E[v].y, z, mp);
  dfs(v + 1, n, x + E[v].x, y, z + E[v].z, mp);
  dfs(v + 1, n, x, y + E[v].y, z + E[v].z, mp);
}
bool back_track(int v, int st, int n, int x, int y, int z) {
  if (v == n) {
    if (x == 0 && y == 0 && z == 0) {
      for (int i = st; i < n; i++) {
        printf("%s\n", op[i].c_str());
      }
      return true;
    }
    return false;
  }
  op[v] = "LM";
  if (back_track(v + 1, st, n, x - E[v].x, y - E[v].y, z)) return true;
  op[v] = "LW";
  if (back_track(v + 1, st, n, x - E[v].x, y, z - E[v].z)) return true;
  op[v] = "MW";
  if (back_track(v + 1, st, n, x, y - E[v].y, z - E[v].z)) return true;
  return false;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d%d%d", &E[i].x, &E[i].y, &E[i].z);
  }
  mp.clear();
  rmp.clear();
  dfs(0, (n + 1) / 2, 0, 0, 0, mp);
  dfs((n + 1) / 2, n, 0, 0, 0, rmp);
  int ans = -INF, ans1, ans2;
  pair<int, int> st1, st2;
  for (auto p : mp) {
    int x = p.first.first;
    int y = p.first.second;
    int val = p.second;
    pair<int, int> vp = pair<int, int>(-x, -y);
    if (rmp.find(vp) != rmp.end()) {
      int s = rmp[vp];
      if (val + s > ans) {
        ans = val + s;
        ans1 = val;
        ans2 = s;
        st1 = p.first;
        st2 = vp;
      }
    }
  }
  if (ans == -INF) {
    puts("Impossible");
    return 0;
  }
  int v = (n + 1) / 2;
  back_track(0, 0, (n + 1) / 2, ans1, ans1 + st1.first, ans1 + st1.second);
  v = n;
  back_track((n + 1) / 2, (n + 1) / 2, n, ans2, ans2 + st2.first,
             ans2 + st2.second);
  return 0;
}
