#include <bits/stdc++.h>
using namespace std;
int n, a[30][4], f[100], naive[5];
int now[30], cnt, l, maxans, sol[30];
bool flag = false;
struct pp {
  int x, y;
  bool operator<(const pp another) const {
    if (x ^ another.x) return x < another.x;
    return y < another.y;
  }
} tmp, haha, __;
map<pp, int> s;
struct rec {
  int x[4];
} p[2000009];
void dfs(int cur) {
  if (cur >= l + 1) {
    cnt++;
    naive[1] = 0, naive[2] = 0, naive[3] = 0;
    for (int i = 1; i <= l; i++) {
      for (int j = 1; j <= 3; j++) {
        if (now[i] != j) p[cnt].x[j] += a[i][j];
      }
    }
    tmp.x = -(p[cnt].x[2] - p[cnt].x[1]);
    tmp.y = -(p[cnt].x[3] - p[cnt].x[2]);
    s[tmp] = max(s[tmp] - 0x3f3f3f3f, p[cnt].x[1]) + 0x3f3f3f3f;
    return;
  }
  now[cur] = 1;
  dfs(cur + 1);
  now[cur] = 2;
  dfs(cur + 1);
  now[cur] = 3;
  dfs(cur + 1);
}
void dfs2(int cur) {
  if (cur >= l + 1) {
    cnt++;
    naive[1] = 0, naive[2] = 0, naive[3] = 0;
    for (int i = 1; i <= l; i++) {
      sol[i] = now[i];
      for (int j = 1; j <= 3; j++) {
        if (now[i] != j) naive[j] += a[i][j];
      }
    }
    haha.x = -(naive[2] - naive[1]);
    haha.y = -(naive[3] - naive[2]);
    if (haha.x == tmp.x && haha.y == tmp.y &&
        naive[1] + 0x3f3f3f3f == s[haha]) {
      for (int i = 1; i <= n; i++) {
        if (sol[i] == 1)
          printf("MW\n");
        else if (sol[i] == 2)
          printf("LW\n");
        else
          printf("LM\n");
      }
      exit(0);
    }
    return;
  }
  now[cur] = 1;
  dfs2(cur + 1);
  now[cur] = 2;
  dfs2(cur + 1);
  now[cur] = 3;
  dfs2(cur + 1);
}
void dfs3(int cur) {
  if (cur >= n + 1) {
    cnt++;
    naive[1] = 0, naive[2] = 0, naive[3] = 0;
    for (int i = l + 1; i <= n; i++) {
      for (int j = 1; j <= 3; j++) {
        if (now[i] != j) naive[j] += a[i][j];
      }
    }
    __.x = naive[2] - naive[1];
    __.y = naive[3] - naive[2];
    if (s[__] != 0) {
      if (naive[1] + s[__] - 0x3f3f3f3f > maxans) {
        tmp.x = __.x;
        tmp.y = __.y;
        maxans = naive[1] + s[__] - 0x3f3f3f3f;
        for (int i = l + 1; i <= n; i++) {
          sol[i] = now[i];
        }
      }
    }
    return;
  }
  now[cur] = 1;
  dfs3(cur + 1);
  if (flag) return;
  now[cur] = 2;
  dfs3(cur + 1);
  if (flag) return;
  now[cur] = 3;
  dfs3(cur + 1);
  if (flag) return;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= 3; j++) {
      scanf("%d", &a[i][j]);
    }
  }
  maxans = -0x3f3f3f3f;
  l = n / 2;
  dfs(1);
  dfs3(l + 1);
  if (maxans == -0x3f3f3f3f) {
    printf("Impossible\n");
    return 0;
  }
  dfs2(1);
}
