#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
template <class T, class U>
inline void Max(T &a, U b) {
  if (a < b) a = b;
}
template <class T, class U>
inline void Min(T &a, U b) {
  if (a > b) a = b;
}
int dp[3][1 << 14], f[3][1 << 14], a[3][25], v[3][25], to[1 << 14];
int main() {
  int T, i, j, k, n, m = 0;
  scanf("%d", &n);
  int s[3] = {0};
  for (i = 0; i < n; i++)
    for (j = 0; j < 3; j++) scanf("%d", &a[j][i]), s[j] += a[j][i];
  m = n / 2;
  int m2 = n - m;
  for (j = 0; j < 3; j++) {
    for (i = 0; i < 1 << m; i++) {
      dp[j][i] = 0;
      for (k = 0; k < m; k++)
        if (i >> k & 1) dp[j][i] += a[j][k];
    }
    for (i = 0; i < 1 << m2; i++) {
      f[j][i] = 0;
      for (k = 0; k < m2; k++)
        if (i >> k & 1) f[j][i] += a[j][m + k];
    }
  }
  map<pair<int, int>, pair<int, int> > g;
  int ans = -1000000007, res[3];
  for (i = 0; i < 1 << m; i++) {
    for (j = i;; j = (j - 1) & i) {
      int p = dp[0][j] + dp[2][i];
      int q = dp[1][i ^ j] + dp[2][i];
      if (!g.count(make_pair(p, q)))
        g[make_pair(p, q)] = make_pair(j, i);
      else {
        pair<int, int> &e = g[make_pair(p, q)];
        if (dp[0][e.first] > dp[0][j]) {
          e = make_pair(j, i);
        }
      }
      if (j == 0) break;
    }
  }
  for (i = 0; i < 1 << m2; i++) {
    for (j = i;; j = (j - 1) & i) {
      int p = f[0][j] + f[2][i];
      int q = f[1][i ^ j] + f[2][i];
      p = s[0] - p;
      q = s[1] - q;
      if (g.count(make_pair(p, q))) {
        pair<int, int> e = g[make_pair(p, q)];
        if (ans < s[0] - dp[0][e.first] - f[0][j]) {
          ans = s[0] - dp[0][e.first] - f[0][j];
          res[0] = e.first | (j << m),
          res[1] = (e.first ^ e.second) | ((i ^ j) << m);
        }
      }
      if (j == 0) break;
    }
  }
  if (ans == -1000000007)
    puts("Impossible");
  else {
    char t[4] = "LMW";
    res[2] = (1 << n) - 1 - res[0] - res[1];
    for (j = 0; j < 3; j++)
      for (i = 0; i < n; i++)
        if (res[j] >> i & 1) v[j][i] = 1;
    for (i = 0; i < n; i++) {
      for (j = 0; j < 3; j++)
        if (!v[j][i]) printf("%c", t[j]);
      puts("");
    }
  }
  return 0;
}
