#include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000000LL;
struct node {
  int x, y, z;
} E[35];
const int MOD = 1000007;
struct HashMap {
  vector<long long> key;
  vector<int> V, next;
  int head[MOD];
  int tot;
  void clear() {
    tot = 0;
    memset(head, -1, sizeof head);
  }
  bool insert(long long s, int v) {
    int t = s % MOD;
    if (t < 0) t += MOD;
    for (int i = head[t]; ~i; i = next[i]) {
      if (key[i] == s) {
        if (V[i] < v) {
          V[i] = v;
          return true;
        }
        return false;
      }
    }
    key.push_back(s);
    V.push_back(v);
    next.push_back(head[t]);
    head[t] = tot++;
    return true;
  }
  int find(long long s) {
    int t = s % MOD;
    if (t < 0) t += MOD;
    for (int i = head[t]; ~i; i = next[i]) {
      if (key[i] == s) {
        return V[i];
      }
    }
    return -INF;
  }
} 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) {
  pair<int, int> pp = pair<int, int>(y - x, z - x);
  if (v == n) {
    long long p = change(pp);
    mp.insert(p, x);
    return;
  }
  dfs(v + 1, n, x + E[v].x, y + E[v].y, z);
  dfs(v + 1, n, x + E[v].x, y, z + E[v].z);
  dfs(v + 1, n, x, y + E[v].y, z + E[v].z);
}
void rdfs(int v, int n, int x, int y, int z) {
  pair<int, int> pp = pair<int, int>(y - x, z - x);
  if (v == n) {
    long long p = change(pp);
    rmp.insert(p, x);
    return;
  }
  rdfs(v + 1, n, x + E[v].x, y + E[v].y, z);
  rdfs(v + 1, n, x + E[v].x, y, z + E[v].z);
  rdfs(v + 1, n, x, y + E[v].y, z + E[v].z);
}
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);
  rdfs((n + 1) / 2, n, 0, 0, 0);
  int ans = -INF, ans1, ans2;
  pair<int, int> st1, st2;
  for (int i = 0; i < mp.tot; i++) {
    int x = mp.key[i] / (2 * INF) - INF;
    int y = mp.key[i] % (2 * INF) - INF;
    int val = mp.V[i];
    long long vp = change(pair<int, int>(-x, -y));
    int s = rmp.find(vp);
    if (s != -INF && val + s > ans) {
      ans = val + s;
      ans1 = val;
      ans2 = s;
      st1 = pair<int, int>(x, y);
      st2 = pair<int, int>(-x, -y);
    }
  }
  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;
}
