#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b, long long c) {
  long long x = 1, y = a;
  while (b > 0) {
    if (b & 1) x = (x * y) % c;
    y = (y * y) % c;
    b /= 2;
  }
  return x % c;
}
int dx[] = {0, -1, 0, 1};
int dy[] = {-1, 0, 1, 0};
int dr[] = {1, 1, 0, -1, -1, -1, 0, 1};
int dc[] = {0, 1, 1, 1, 0, -1, -1, -1};
const int N = 30;
struct Node {
  long long l, m, w;
} A[N];
long long n;
set<long long> second;
map<long long, long long> M, RM;
vector<string> VS;
map<pair<long long, long long>, vector<vector<string> > > first;
map<pair<long long, long long>,
    vector<pair<pair<long long, long long>, long long> > >
    MP;
void doit(long long idx, long long lo, long long mm, long long ww) {
  if (idx == n / 2 + 1) {
    first[make_pair(lo - mm, mm - ww)].push_back(VS);
    MP[make_pair(lo - mm, mm - ww)].push_back(make_pair(make_pair(lo, mm), ww));
    return;
  }
  VS.push_back("LM");
  doit(idx + 1, lo + A[idx].l, mm + A[idx].m, ww);
  VS.pop_back();
  VS.push_back("LW");
  doit(idx + 1, lo + A[idx].l, mm, ww + A[idx].w);
  VS.pop_back();
  VS.push_back("MW");
  doit(idx + 1, lo, mm + A[idx].m, ww + A[idx].w);
  VS.pop_back();
}
map<long long, vector<string> > ANS;
void doit1(long long idx, long long lo, long long mm, long long ww) {
  if (idx > n) {
    long long aa = mm - lo, bb = ww - mm;
    if (first.find(make_pair(aa, bb)) != first.end()) {
      long long kk = -1e8, id = 0, ff = 0, au = 0;
      for (auto u : MP[make_pair(aa, bb)]) {
        au = u.second + ww;
        if (kk < au) {
          ff = id;
          kk = au;
        }
        id++;
      }
      vector<string> pp = first[make_pair(aa, bb)][ff];
      for (auto u : VS) pp.push_back(u);
      ANS[kk] = pp;
    }
    return;
  }
  VS.push_back("LM");
  doit1(idx + 1, lo + A[idx].l, mm + A[idx].m, ww);
  VS.pop_back();
  VS.push_back("LW");
  doit1(idx + 1, lo + A[idx].l, mm, ww + A[idx].w);
  VS.pop_back();
  VS.push_back("MW");
  doit1(idx + 1, lo, mm + A[idx].m, ww + A[idx].w);
  VS.pop_back();
}
int main() {
  long long cnt = 0;
  scanf("%lld", &n);
  for (int i = 1; i <= n; ++i) {
    long long x, y, z;
    scanf("%lld%lld%lld", &x, &y, &z);
    A[i].l = x;
    A[i].m = y;
    A[i].w = z;
  }
  VS.clear();
  doit(1, 0, 0, 0);
  VS.clear();
  doit1(n / 2 + 1, 0, 0, 0);
  bool fl = 0;
  long long sz = ANS.size();
  if (!sz) {
    printf("Impossible\n");
    return 0;
  }
  auto it = ANS.end();
  --it;
  vector<string> fin = (*it).second;
  for (auto u : fin) {
    cout << u << "\n";
  }
  return 0;
}
