#include <bits/stdc++.h>
using namespace std;
const int maxn = 26;
const int inf = 0x3f3f3f3f;
int n;
int a[3][maxn];
char s[3][4] = {"MW", "LW", "LM"};
struct node {
  int id, x, d1, d2;
  node() {}
  node(int id, int x, int d1, int d2) : id(id), x(x), d1(d1), d2(d2) {}
  bool operator<(const node &rhs) const {
    if (d1 != rhs.d1) return d1 < rhs.d1;
    return d2 < rhs.d2;
  }
} s1[2222222], s2[2222222];
node cal(int beg, int end, int st) {
  int sum[3] = {0, 0, 0};
  int ss = st;
  for (int i = beg; i < end; i++) {
    int x = st % 3;
    st /= 3;
    for (int j = 0; j < 3; j++) {
      if (j == x) continue;
      sum[j] += a[j][i];
    }
  }
  return node(ss, sum[0], sum[1] - sum[0], sum[2] - sum[0]);
}
void print(int beg, int end, int st) {
  for (int i = beg; i < end; i++) {
    int x = st % 3;
    puts(s[x]);
    st /= 3;
  }
}
int pow3[15];
int main() {
  pow3[0] = 1;
  for (int i = 1; i <= 13; i++) pow3[i] = pow3[i - 1] * 3;
  while (cin >> n) {
    for (int i = 0; i < n; i++)
      for (int j = 0; j < 3; j++) scanf("%d", &a[j][i]);
    if (n == 1) {
      bool flag = 0;
      for (int i = 0; i < 3; i++) {
        int cnt = 0;
        for (int j = 0; j < 3; j++) {
          if (j == i) continue;
          if (a[j][0] == 0) cnt++;
        }
        if (cnt == 2) {
          flag = 1;
          puts(s[i]);
          break;
        }
      }
      if (!flag) puts("Impossible");
      continue;
    }
    bool flag = 0;
    int mx = -inf;
    int m = n >> 1;
    int c1 = pow3[m], c2 = pow3[n - m];
    int st1, st2;
    for (int i = 0; i < c1; i++) {
      s1[i] = cal(0, m, i);
    }
    for (int i = 0; i < c2; i++) {
      s2[i] = cal(m, n, i);
    }
    sort(s2, s2 + c2);
    for (int i = 0; i < c1; i++) {
      int beg = lower_bound(s2, s2 + c2, node(0, 0, -s1[i].d1, -s1[i].d2)) - s2;
      int end = upper_bound(s2, s2 + c2, node(0, 0, -s1[i].d1, -s1[i].d2)) - s2;
      for (int j = beg; j < end; j++) {
        if (s1[i].d1 + s2[j].d1 != 0 || s1[i].d2 + s2[j].d2 != 0) break;
        int all = s1[i].x + s2[j].x;
        flag = 1;
        if (all > mx) {
          mx = all;
          st1 = i;
          st2 = s2[j].id;
        }
      }
    }
    if (!flag)
      puts("Impossible");
    else {
      print(0, m, st1);
      print(m, n, st2);
    }
  }
  return 0;
}
