#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(T &x);
template <typename T>
void write(T x);
template <typename T>
void writesp(T x);
template <typename T>
void writeln(T x);
const long long N = 26;
long long val[N][3];
long long tmp, ans, rem1;
map<pair<long long, long long>, long long> mp;
pair<long long, long long> rem, Rem1, Rem2;
long long n;
long long _stack[N][2];
long long c[4] = {' ', 'L', 'M', 'W'};
inline void dfs(long long now, long long End, long long sum1, long long sum2,
                long long sum3, bool type) {
  if (now == End + 1) {
    if (End != n) {
      rem = make_pair(sum2 - sum1, sum3 - sum2);
      if (!type) {
        if (mp.find(rem) == mp.end()) {
          mp[rem] = sum1 + sum2 + sum3;
        } else
          mp[rem] = max(mp[rem], sum1 + sum2 + sum3);
      } else {
        if (rem == Rem1 && sum1 + sum2 + sum3 == mp[Rem1]) {
          for (register long long i = 1; i <= End; i++)
            putchar(c[_stack[i][0]]), putchar(c[_stack[i][1]]), putchar('\n');
          Rem1 = make_pair(-0x7fffffff, -0x7fffffff);
        }
      }
    } else {
      rem = make_pair(sum1 - sum2, sum2 - sum3);
      if (!type) {
        if (mp.find(rem) != mp.end()) {
          tmp = mp[rem] + sum1 + sum2 + sum3;
          if (ans < tmp) {
            Rem1 = Rem2 = rem;
            ans = tmp;
            rem1 = sum1 + sum2 + sum3;
          }
        }
      } else {
        if (rem == Rem2 && sum1 + sum2 + sum3 == rem1) {
          for (register long long i = n / 2 + 1; i <= n; i++)
            putchar(c[_stack[i][0]]), putchar(c[_stack[i][1]]), putchar('\n');
          Rem2 = make_pair(-0x7fffffff, -0x7fffffff);
        }
      }
    }
    return;
  }
  if (type) _stack[now][0] = 1, _stack[now][1] = 2;
  dfs(now + 1, End, sum1 + val[now][0], sum2 + val[now][1], sum3, type);
  if (type) _stack[now][0] = 1, _stack[now][1] = 3;
  dfs(now + 1, End, sum1 + val[now][0], sum2, sum3 + val[now][2], type);
  if (type) _stack[now][0] = 2, _stack[now][1] = 3;
  dfs(now + 1, End, sum1, sum2 + val[now][1], sum3 + val[now][2], type);
}
int main() {
  ans = -0x7fffffff;
  read(n);
  for (register long long i = 1; i <= n; i++) {
    read(val[i][0]);
    read(val[i][1]);
    read(val[i][2]);
  }
  dfs(1, n / 2, 0, 0, 0, 0);
  dfs(n / 2 + 1, n, 0, 0, 0, 0);
  if (ans == -0x7fffffff) return 0 * puts("Impossible");
  dfs(1, n / 2, 0, 0, 0, 1);
  dfs(n / 2 + 1, n, 0, 0, 0, 1);
}
template <typename T>
void read(T &x) {
  char wn = getchar();
  long long t = 1;
  x = 0;
  while (wn < '0' || wn > '9') {
    if (wn == '-') t = -1;
    wn = getchar();
  }
  while (wn >= '0' && wn <= '9') {
    x = x * 10 + wn - '0';
    wn = getchar();
  }
  x *= t;
}
template <typename T>
void write(T x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x <= 9) {
    putchar(x + '0');
    return;
  }
  write(x / 10);
  putchar(x % 10 + '0');
}
template <typename T>
void writeln(T x) {
  write(x);
  putchar('\n');
}
template <typename T>
void writesp(T x) {
  write(x);
  putchar(' ');
}
