#include <bits/stdc++.h>
using namespace std;
const long long N = 30;
const long long inf = 1e18;
long long read() {
  long long s = 0;
  char c = getchar(), lc = '+';
  while (c < '0' || '9' < c) lc = c, c = getchar();
  while ('0' <= c && c <= '9') s = s * 10 + c - '0', c = getchar();
  return lc == '-' ? -s : s;
}
void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x < 10)
    putchar(x + '0');
  else
    write(x / 10), putchar(x % 10 + '0');
}
void print(long long x = -1, char c = '\n') {
  write(x);
  putchar(c);
}
long long a[N][3], ans = -inf, st = 0;
map<pair<long long, long long>, pair<long long, long long>> mp;
void dfs1(long long now, long long up, long long x, long long y, long long z,
          long long s) {
  if (now > up) {
    auto xxx = make_pair(x - y, x - z);
    if (mp.count(xxx))
      mp[xxx] = max(mp[xxx], make_pair(x, s));
    else
      mp[xxx] = make_pair(x, s);
    return;
  }
  dfs1(now + 1, up, x, y + a[now][1], z + a[now][2], s);
  dfs1(now + 1, up, x + a[now][0], y, z + a[now][2],
       s | (1LL << (now * 2 - 2)));
  dfs1(now + 1, up, x + a[now][0], y + a[now][1], z,
       s | (2LL << (now * 2 - 2)));
}
void dfs2(long long now, long long up, long long x, long long y, long long z,
          long long s) {
  if (now > up) {
    auto xxx = make_pair(y - x, z - x);
    if (mp.count(xxx) && mp[xxx].first + x > ans) {
      ans = mp[xxx].first + x;
      st = s | mp[xxx].second;
    }
    return;
  }
  dfs2(now + 1, up, x, y + a[now][1], z + a[now][2], s);
  dfs2(now + 1, up, x + a[now][0], y, z + a[now][2],
       s | (1LL << (now * 2 - 2)));
  dfs2(now + 1, up, x + a[now][0], y + a[now][1], z,
       s | (2LL << (now * 2 - 2)));
}
signed main(signed Goodbye, char *Wangang[]) {
  (void)Goodbye, (void)Wangang;
  long long n = read() + 1;
  for (long long i = 1; i < n; i++)
    a[i][0] = read(), a[i][1] = read(), a[i][2] = read();
  dfs1(1, n / 2, 0, 0, 0, 0);
  dfs2(n / 2 + 1, n, 0, 0, 0, 0);
  if (ans == -inf) return puts("Impossible"), 0;
  for (long long i = 1; i < n; i++, st >>= 2)
    puts((char[][8]){"MW", "LW", "LM", "wcakioi"}[st & 3]);
  return 0;
}
