#include <bits/stdc++.h>
using namespace std;
const int N = 30;
const int INF = 1e9 + 7;
int n;
struct node {
  int a, b, c;
  node() {}
  node(int a, int b, int c) : a(a), b(b), c(c) {}
  node operator+(const node &_) { return node(a + _.a, b + _.b, c + _.c); }
};
node read() {
  node p;
  scanf("%d%d%d", &p.a, &p.b, &p.c);
  return p;
}
vector<node> va, vb;
vector<pair<pair<long long, long long>, int> > da, db;
bool flag = 0;
void sear(int cur, vector<node> &v,
          vector<pair<pair<long long, long long>, int> > &d,
          node tmp = node(0, 0, 0), long long mask = 0) {
  if (cur >= (int)((v).size())) {
    tmp.b -= tmp.a;
    tmp.c -= tmp.a;
    if (flag)
      d.push_back({make_pair(1ll * INF * tmp.b + tmp.c, mask), -tmp.a});
    else
      d.push_back({make_pair(1ll * INF * (-tmp.b) - tmp.c, mask), -tmp.a});
    return;
  }
  tmp = tmp + v[cur];
  tmp.a -= v[cur].a;
  sear(cur + 1, v, d, tmp, mask * 3 + 0);
  tmp.a += v[cur].a;
  tmp.b -= v[cur].b;
  sear(cur + 1, v, d, tmp, mask * 3 + 1);
  tmp.b += v[cur].b;
  tmp.c -= v[cur].c;
  sear(cur + 1, v, d, tmp, mask * 3 + 2);
  tmp.c += v[cur].c;
}
void show(long long mask, int lim) {
  vector<int> tmp;
  for (int i = 0; i < lim; mask /= 3, i++) tmp.push_back(mask % 3);
  reverse((tmp).begin(), (tmp).end());
  for (int i = (0); i < ((int)((tmp).size())); i++) {
    if (tmp[i] == 0) puts("MW");
    if (tmp[i] == 1) puts("LW");
    if (tmp[i] == 2) puts("LM");
  }
}
int main() {
  cin >> n;
  int m = n >> 1;
  for (int i = (0); i < (m); i++) va.push_back(read());
  for (int i = (m); i < (n); i++) vb.push_back(read());
  flag = false;
  sear(0, va, da);
  sort((da).begin(), (da).end());
  da.erase(unique((da).begin(), (da).end()), da.end());
  flag = true;
  sear(0, vb, db);
  sort((db).begin(), (db).end());
  db.erase(unique((db).begin(), (db).end()), db.end());
  int curb = 0;
  pair<long long, pair<int, int> > ans = {-1ll * INF * INF, {0, 0}};
  for (int cura = (0); cura < ((int)((da).size())); cura++) {
    for (; curb < (int)((db).size()) &&
           db[curb].first.first < da[cura].first.first;
         curb++)
      ;
    if (curb >= (int)((db).size())) break;
    if (db[curb].first.first == da[cura].first.first) {
      ans = max(ans,
                {-da[cura].second - (long long)db[curb].second, {cura, curb}});
    }
  }
  if (ans.first > -1ll * INF * INF) {
    show(da[ans.second.first].first.second, m);
    show(db[ans.second.second].first.second, n - m);
    return 0;
  }
  puts("Impossible");
  return 0;
}
