#include <bits/stdc++.h>
using namespace std;
const int mn = 2 * 1e5 + 10, oo = 30 * 1e7;
map<pair<int, int>, pair<int, int> > f;
int n, a[30], b[30], c[30], A, B, C, ans, ans1, ans2;
void get(int x, int p, int k, int Way) {
  if (p > k) {
    if (x == 0) {
      pair<int, int> p1(A - B, A - C);
      pair<int, int> p2(A, Way);
      map<pair<int, int>, pair<int, int> >::iterator p = f.find(p1);
      if (p != f.end()) {
        if (p->second.first < A) p->second = p2;
      } else
        f[p1] = p2;
    } else {
      pair<int, int> p1(B - A, C - A);
      map<pair<int, int>, pair<int, int> >::iterator p = f.find(p1);
      if (p != f.end()) {
        if (ans < p->second.first + A) {
          ans = p->second.first + A;
          ans1 = p->second.second;
          ans2 = Way;
        }
      }
    }
    return;
  }
  A += a[p];
  B += b[p];
  get(x, p + 1, k, Way * 3);
  B -= b[p];
  C += c[p];
  get(x, p + 1, k, Way * 3 + 1);
  A -= a[p];
  B += b[p];
  get(x, p + 1, k, Way * 3 + 2);
  B -= b[p];
  C -= c[p];
}
void Write(int p, int n) {
  if (n == 0) return;
  Write(p / 3, n - 1);
  if (p % 3 == 0)
    printf("LM\n");
  else if (p % 3 == 1)
    printf("LW\n");
  else
    printf("MW\n");
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d%d%d", &a[i], &b[i], &c[i]);
  int n_ = n >> 1;
  get(0, 1, n_, 0);
  ans = -oo;
  get(1, n_ + 1, n, 0);
  if (ans == -oo) {
    printf("Impossible\n");
  } else {
    Write(ans1, n_);
    Write(ans2, n - n_);
  }
  return 0;
}
