#include <bits/stdc++.h>
using namespace std;
pair<int, int> P;
map<pair<int, int>, int> mp;
struct node {
  int a, b, c;
} T[30];
bool found = 0, got = 0;
char res[5];
int n, ans[30], ans1, ans2, ans3, ma = -2000000000, now[30];
int test[30];
void make(int x, int y, int z, int d) {
  if (d == n + 1) {
    P.first = x - y, P.second = x - z;
    if (mp.find(P) == mp.end())
      mp[P] = x;
    else
      mp[P] = max(mp[P], x);
    return;
  }
  test[d] = 3;
  make(x + T[d].a, y + T[d].b, z, d + 1);
  test[d] = 1;
  make(x, y + T[d].b, z + T[d].c, d + 1);
  test[d] = 2;
  make(x + T[d].a, y, z + T[d].c, d + 1);
}
void search(int d, int x, int y, int z) {
  if (d == n / 2 + 1) {
    P.first = y - x, P.second = z - x;
    if (mp.find(P) != mp.end()) {
      if (mp[P] + x > ma) {
        ma = mp[P] + x;
        ans1 = y - x, ans2 = z - x, ans3 = mp[P];
        for (int i = 1; i < d; i++) ans[i] = now[i];
        found = 1;
      }
    }
    return;
  }
  now[d] = 2;
  search(d + 1, x + T[d].a, y, z + T[d].c);
  now[d] = 3;
  search(d + 1, x + T[d].a, y + T[d].b, z);
  now[d] = 1;
  search(d + 1, x, y + T[d].b, z + T[d].c);
}
void research(int d, int x, int y, int z) {
  if (got) return;
  if (d == n + 1) {
    if (x - y == ans1 && x - z == ans2 && x == ans3) got = 1;
    return;
  }
  ans[d] = 2;
  research(d + 1, x + T[d].a, y, z + T[d].c);
  if (got) return;
  ans[d] = 3;
  research(d + 1, x + T[d].a, y + T[d].b, z);
  if (got) return;
  ans[d] = 1;
  research(d + 1, x, y + T[d].b, z + T[d].c);
}
int main() {
  int i, k, j;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d%d%d", &T[i].a, &T[i].b, &T[i].c);
  make(0, 0, 0, n / 2 + 1);
  P.first = 0, P.second = -1;
  search(1, 0, 0, 0);
  res[1] = 'L', res[2] = 'M', res[3] = 'W';
  if (found) {
    for (i = 1; i <= n / 2; i++) {
      for (k = 1; k <= 3; k++)
        if (ans[i] != k) printf("%c", res[k]);
      puts("");
    }
    research(n / 2 + 1, 0, 0, 0);
    for (i = n / 2 + 1; i <= n; i++) {
      for (k = 1; k <= 3; k++)
        if (ans[i] != k) printf("%c", res[k]);
      puts("");
    }
  } else
    puts("Impossible");
  return 0;
}
