#include <bits/stdc++.h>
using namespace std;
map<pair<int, int>, pair<int, int> > mp;
map<pair<int, int>, pair<int, int> >::iterator it;
int ed, no, ansa, s1, s2;
int a[30], b[30], c[30];
void dfs(int step, int s, int val, int sb, int sc) {
  if (step == ed) {
    if (no == 0) {
      it = mp.find(pair<int, int>(sb, sc));
      if (it == mp.end())
        mp[pair<int, int>(sb, sc)] = pair<int, int>(val, s);
      else {
        pair<int, int> &t = it->second;
        if (t.first < val) t = pair<int, int>(val, s);
      }
    } else {
      it = mp.find(pair<int, int>(-sb, -sc));
      if (it != mp.end()) {
        int t = (it->second).first + val;
        if (t > ansa) {
          s1 = (it->second).second;
          s2 = s;
          ansa = t;
        }
      }
    }
    return;
  }
  for (int i = 0; i < 3; i++)
    if (i == 0)
      dfs(step + 1, s * 3 + i, val + a[step], sb + (b[step] - a[step]),
          sc + (0 - a[step]));
    else if (i == 1)
      dfs(step + 1, s * 3 + i, val + a[step], sb + (0 - a[step]),
          sc + (c[step] - a[step]));
    else
      dfs(step + 1, s * 3 + i, val, sb + (b[step] - 0), sc + (c[step] - 0));
}
void print(int s, int step) {
  if (step == 0) return;
  print(s / 3, step - 1);
  int t = s % 3;
  puts(t == 0 ? "LM" : t == 1 ? "LW" : "MW");
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d%d%d", a + i, b + i, c + i);
  if (n == 1) {
    if (a[0] == 0 && b[0] == 0)
      puts("LM");
    else if (a[0] == 0 && c[0] == 0)
      puts("LW");
    else if (b[0] == 0 && c[0] == 0)
      puts("MW");
    else
      puts("Impossible");
    return 0;
  }
  ed = n / 2;
  dfs(0, 0, 0, 0, 0);
  no = 1;
  ed = n;
  ansa = INT_MIN;
  dfs(n / 2, 0, 0, 0, 0);
  if (ansa == INT_MIN)
    puts("Impossible");
  else {
    print(s1, n / 2);
    print(s2, n - n / 2);
  }
}
