#include <bits/stdc++.h>
using namespace std;
const int inf = 0x7fffffff;
int n, A[30], B[30], C[30], maxn, ans = -inf, printx, printy, num[2000010],
                                  cntt, cnt;
struct node {
  int zhuangtai, x;
} e[2000010];
struct node2 {
  int x, y;
  bool operator<(const node2 &a) const { return a.x == x ? a.y < y : a.x < x; }
};
map<node2, int> a;
void dfs1(int dep, int x, int y, int z, int sta) {
  if (dep == maxn + 1) {
    y -= x;
    z -= x;
    node2 temp;
    temp.x = y;
    temp.y = z;
    if (a.find(temp) == a.end()) {
      a[temp] = ++cnt;
      e[cnt].zhuangtai = sta;
      e[cnt].x = x;
    } else {
      if (e[a[temp]].x < x) {
        e[a[temp]].x = x;
        e[a[temp]].zhuangtai = sta;
      }
    }
    return;
  }
  for (int i = 0; i < 3; i++) {
    if (i == 0) dfs1(dep + 1, x + A[dep], y + B[dep], z, sta * 3);
    if (i == 1) dfs1(dep + 1, x + A[dep], y, z + C[dep], sta * 3 + 1);
    if (i == 2) dfs1(dep + 1, x, y + B[dep], z + C[dep], sta * 3 + 2);
  }
}
void dfs2(int dep, int x, int y, int z, int sta) {
  if (dep == maxn) {
    y -= x;
    z -= x;
    y = -y;
    z = -z;
    node2 temp;
    temp.x = y;
    temp.y = z;
    if (a.find(temp) != a.end()) {
      if (e[a[temp]].x + x > ans) {
        ans = e[a[temp]].x + x;
        printx = e[a[temp]].zhuangtai;
        printy = sta;
      }
    }
    return;
  }
  for (int i = 0; i < 3; i++) {
    if (i == 0) dfs2(dep - 1, x + A[dep], y + B[dep], z, sta * 3);
    if (i == 1) dfs2(dep - 1, x + A[dep], y, z + C[dep], sta * 3 + 1);
    if (i == 2) dfs2(dep - 1, x, y + B[dep], z + C[dep], sta * 3 + 2);
  }
}
void print() {
  for (int i = 1; i <= maxn; i++) {
    num[++cntt] = printx % 3;
    printx /= 3;
  }
  for (int i = cntt; i >= 1; i--) {
    if (num[i] == 0) puts("LM");
    if (num[i] == 1) puts("LW");
    if (num[i] == 2) puts("MW");
  }
  cntt = 0;
  for (int i = maxn + 1; i <= n; i++) {
    num[++cntt] = printy % 3;
    printy /= 3;
  }
  for (int i = 1; i <= cntt; i++) {
    if (num[i] == 0) puts("LM");
    if (num[i] == 1) puts("LW");
    if (num[i] == 2) puts("MW");
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d%d", &A[i], &B[i], &C[i]);
  if (n % 2 == 0)
    maxn = n / 2;
  else
    maxn = n / 2 + 1;
  dfs1(1, 0, 0, 0, 0);
  dfs2(n, 0, 0, 0, 0);
  if (ans != -inf)
    print();
  else
    puts("Impossible");
  return 0;
}
