#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
long long n;
int aa[26][5];
map<pair<int, pair<int, int> >, int> m;
struct mvs {
  int a, b, c, cd, org, ac;
};
mvs v2[3000002], v[3000002];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= 3; ++j) cin >> aa[i][j];
  int mdl = (n + 1) / 2;
  int sf = 1;
  int stt = 1;
  for (int i = 1; v[i].ac < mdl; ++i) {
    int q = v[i].ac + 1;
    v[++sf] = {v[i].a + aa[q][1], v[i].b + aa[q][2], v[i].c, 12, i, q};
    v[++sf] = {v[i].a + aa[q][1], v[i].b, v[i].c + aa[q][3], 13, i, q};
    v[++sf] = {v[i].a, v[i].b + aa[q][2], v[i].c + aa[q][3], 23, i, q};
    ++stt;
  }
  for (int j = stt; j <= sf; ++j) {
    int aa = min(v[j].a, min(v[j].b, v[j].c));
    if (!m[{v[j].a - aa, {v[j].b - aa, v[j].c - aa}}])
      m[{v[j].a - aa, {v[j].b - aa, v[j].c - aa}}] = j;
    else {
      int p = m[{v[j].a - aa, {v[j].b - aa, v[j].c - aa}}];
      if (v[j].a + v[j].b + v[j].c > v[p].a + v[p].b + v[p].c)
        m[{v[j].a - aa, {v[j].b - aa, v[j].c - aa}}] = j;
    }
  }
  v2[1].ac = mdl;
  int sf2 = 1;
  int stn = 1;
  for (int i = 1; v2[i].ac < n; ++i) {
    int q = v2[i].ac + 1;
    v2[++sf2] = {v2[i].a + aa[q][1], v2[i].b + aa[q][2], v2[i].c, 12, i, q};
    v2[++sf2] = {v2[i].a + aa[q][1], v2[i].b, v2[i].c + aa[q][3], 13, i, q};
    v2[++sf2] = {v2[i].a, v2[i].b + aa[q][2], v2[i].c + aa[q][3], 23, i, q};
    ++stn;
  }
  int smax = -1000000000;
  int mrka = 0, mrkb = 0;
  for (int j = stn; j <= sf2; ++j) {
    int mx = max(v2[j].a, max(v2[j].b, v2[j].c));
    if (m[{mx - v2[j].a, {mx - v2[j].b, mx - v2[j].c}}]) {
      int p = m[{mx - v2[j].a, {mx - v2[j].b, mx - v2[j].c}}];
      int ss = v[p].a + v[p].b + v[p].c + v2[j].a + v2[j].c + v2[j].b;
      if (ss > smax) smax = ss, mrka = p, mrkb = j;
    }
  }
  if (!mrka && !mrkb)
    cout << "Impossible" << '\n';
  else {
    deque<int> sol;
    deque<int> sol2;
    while (mrka != 1) {
      sol.push_front(mrka);
      mrka = v[mrka].org;
    }
    while (mrkb != 1) {
      sol2.push_front(mrkb);
      mrkb = v2[mrkb].org;
    }
    for (int i = 0; i < sol.size(); ++i) {
      int nr = sol[i];
      if (v[nr].cd == 12) cout << "LM\n";
      if (v[nr].cd == 13) cout << "LW\n";
      if (v[nr].cd == 23) cout << "MW\n";
    }
    for (int i = 0; i < sol2.size(); ++i) {
      int nr = sol2[i];
      if (v2[nr].cd == 12) cout << "LM\n";
      if (v2[nr].cd == 13) cout << "LW\n";
      if (v2[nr].cd == 23) cout << "MW\n";
    }
  }
  return 0;
}
