#include <bits/stdc++.h>
using namespace std;
template <class T>
T sqr(T x) {
  return x * x;
}
long double pi = 3.1415926535897932384626433832795;
const int N = 4e5 + 10, lg = 31, MAXN = 1111;
long long mod = 1e9 + 7;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long _gcd(long long a, long long b, long long& x, long long& y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  long long _x1, _y1;
  long long d = _gcd(b % a, a, _x1, _y1);
  x = _y1 - (b / a) * _x1;
  y = _x1;
  return d;
}
long long binpow(long long a, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) res *= a;
    a *= a;
    n >>= 1;
    a %= mod;
    res %= mod;
  }
  return res;
}
void term_res(string res) {
  cout << res;
  exit(0);
}
int dx[] = {0, 0, -1, 1}, dy[] = {-1, 1, 0, 0};
int n, half;
int A[33][33];
int ans = -2e9;
pair<int, int> cur_ans = make_pair(0, 0);
map<pair<int, int>, int> first_half;
map<pair<int, int>, int> first_half_str;
void rec(int cur, int a, int b, int c, int lvl = 0) {
  if (lvl == half) {
    if (!first_half.count(make_pair(a - b, b - c)) ||
        first_half.count(make_pair(a - b, b - c)) < c)
      first_half[make_pair(a - b, b - c)] = c,
                                      first_half_str[make_pair(a - b, b - c)] =
                                          cur;
    return;
  }
  int s1 = cur * 4 + 3;
  int a1 = A[lvl][0] + a, b1 = A[lvl][1] + b, c1 = c;
  rec(s1, a1, b1, c1, lvl + 1);
  int s2 = cur * 4 + 2;
  int a2 = A[lvl][0] + a, b2 = b, c2 = A[lvl][2] + c;
  rec(s2, a2, b2, c2, lvl + 1);
  int s3 = cur * 4 + 1;
  int a3 = a, b3 = A[lvl][1] + b, c3 = A[lvl][2] + c;
  rec(s3, a3, b3, c3, lvl + 1);
}
void rec1(int cur, int a, int b, int c, int lvl = half) {
  if (lvl == n) {
    pair<int, int> pr = make_pair(b - a, c - b);
    if (first_half.count(pr)) {
      int cur_tans = c + first_half[pr];
      if (cur_tans > ans)
        ans = cur_tans, cur_ans = make_pair(first_half_str[pr], cur);
    }
    return;
  }
  int s1 = cur * 4 + 3;
  int a1 = A[lvl][0] + a, b1 = A[lvl][1] + b, c1 = c;
  rec1(s1, a1, b1, c1, lvl + 1);
  int s2 = cur * 4 + 2;
  int a2 = A[lvl][0] + a, b2 = b, c2 = A[lvl][2] + c;
  rec1(s2, a2, b2, c2, lvl + 1);
  int s3 = cur * 4 + 1;
  int a3 = a, b3 = A[lvl][1] + b, c3 = A[lvl][2] + c;
  rec1(s3, a3, b3, c3, lvl + 1);
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 3; j++) {
      cin >> A[i][j];
    }
  }
  half = n / 2;
  bool ok = 0;
  rec(0, 0, 0, 0);
  rec1(0, 0, 0, 0);
  if (cur_ans == make_pair(0, 0)) term_res("Impossible");
  string res = "";
  int cur = cur_ans.second;
  while (cur != 0) {
    int get = cur % 4;
    cur /= 4;
    if (get == 1) res = "MW" + res;
    if (get == 2) res = "LW" + res;
    if (get == 3) res = "LM" + res;
  }
  cur = cur_ans.first;
  while (cur != 0) {
    int get = cur % 4;
    cur /= 4;
    if (get == 1) res = "MW" + res;
    if (get == 2) res = "LW" + res;
    if (get == 3) res = "LM" + res;
  }
  for (int i = 0; i < res.length(); i += 2)
    cout << res[i] << res[i + 1] << '\n';
  return 0;
}
