#include <bits/stdc++.h>
using namespace std;
struct data {
  int bit, l, m, w;
  data() {}
  data(int bb, int ll, int mm, int ww) {
    bit = bb;
    l = ll;
    m = mm;
    w = ww;
  }
  bool operator<(const data &d1) const {
    if (l - m == d1.l - d1.m) return l - w < d1.l - d1.w;
    return l - m < d1.l - d1.m;
  }
};
int n;
int l[26], m[26], w[26];
vector<data> dat;
map<int, map<int, data> > mp;
bool flag;
string res[27];
int big;
void init() {
  for (int i = 0; i < dat.size(); i++) {
    if (mp[dat[i].l - dat[i].m].find(dat[i].l - dat[i].w) ==
        mp[dat[i].l - dat[i].m].end()) {
      mp[dat[i].l - dat[i].m].insert(
          map<int, data>::value_type(dat[i].l - dat[i].w, dat[i]));
    } else {
      data nm = mp[dat[i].l - dat[i].m][dat[i].l - dat[i].w];
      if (nm.l + nm.w + nm.m < dat[i].l + dat[i].m + dat[i].w) {
        mp[dat[i].l - dat[i].m][dat[i].l - dat[i].w] = dat[i];
      }
    }
  }
}
void dfs(int a, int b, int c, int v, int bit) {
  if (v == (n + 1) / 2) {
    dat.push_back(data(bit, a, b, c));
  } else {
    dfs(a, b + m[v], c + w[v], v + 1, bit * 3);
    dfs(a + l[v], b, c + w[v], v + 1, bit * 3 + 1);
    dfs(a + l[v], b + m[v], c, v + 1, bit * 3 + 2);
  }
}
void dfs2(int a, int b, int c, int v, int bit) {
  if (v == n) {
    if (mp[-(a - b)].find(-(a - c)) != mp[-(a - b)].end()) {
      data nm = mp[-(a - b)][-(a - c)];
      if (flag) {
        if (big > a + b + c + nm.l + nm.m + nm.w) return;
      }
      flag = true;
      big = a + b + c + nm.l + nm.m + nm.w;
      int lbit = nm.bit;
      for (int i = (n + 1) / 2 - 1; i >= 0; i--) {
        if (lbit % 3 == 0) res[i] = "MW";
        if (lbit % 3 == 1) res[i] = "LW";
        if (lbit % 3 == 2) res[i] = "LM";
        lbit /= 3;
      }
      for (int i = n - 1; i >= (n + 1) / 2; i--) {
        if (bit % 3 == 0) res[i] = "MW";
        if (bit % 3 == 1) res[i] = "LW";
        if (bit % 3 == 2) res[i] = "LM";
        bit /= 3;
      }
    }
  } else {
    dfs2(a, b + m[v], c + w[v], v + 1, bit * 3);
    dfs2(a + l[v], b, c + w[v], v + 1, bit * 3 + 1);
    dfs2(a + l[v], b + m[v], c, v + 1, bit * 3 + 2);
  }
}
int main(void) {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d %d %d", &l[i], &m[i], &w[i]);
  }
  dfs(0, 0, 0, 0, 0);
  sort(dat.begin(), dat.end());
  init();
  flag = false;
  dfs2(0, 0, 0, (n + 1) / 2, 0);
  if (flag) {
    for (int i = 0; i < n; i++) {
      cout << res[i] << endl;
    }
  } else
    printf("Impossible\n");
  return 0;
}
