#include <bits/stdc++.h>
using namespace std;
double eps = 1e-6;
const int maxn = 210;
const int mod = 1e9 + 7;
const int INF = mod;
int n, st1, st2;
int l[maxn], m[maxn], w[maxn], dp[maxn];
map<pair<int, int>, int> hs;
map<pair<int, int>, int> hsV;
int ans = -INF;
void Dfs2(int d, int R, long long x, long long y, long long z, int s) {
  if (d > R) {
    pair<int, int> pr(y - x, z - x);
    if (hs.count(pr) >= 1) {
      if (hsV[pr] < x) hsV[pr] = x, hs[pr] = s;
    } else
      hs[pr] = s, hsV[pr] = x;
    return;
  }
  if (ans != -INF && x + dp[d] <= ans) return;
  Dfs2(d + 1, R, x + l[d], y + m[d], z, s * 3 + 0);
  Dfs2(d + 1, R, x + l[d], y, z + w[d], s * 3 + 1);
  Dfs2(d + 1, R, x, y + m[d], z + w[d], s * 3 + 2);
}
void Print(int s1, int s2) {
  vector<int> nd1, nd2;
  while (s1 >= 0) {
    int x = s1 % 3;
    s1 = s1 / 3;
    nd1.push_back(x);
    if (nd1.size() == (n + 1) >> 1) break;
  }
  while (s2 >= 0) {
    int x = s2 % 3;
    s2 = s2 / 3;
    nd2.push_back(x);
    if (nd2.size() == n - ((n + 1) >> 1)) break;
  }
  for (int i = nd1.size() - 1; i >= 0; i--) {
    if (nd1[i] == 0)
      cout << "LM" << endl;
    else if (nd1[i] == 1)
      cout << "LW" << endl;
    else if (nd1[i] == 2)
      cout << "MW" << endl;
  }
  for (int i = nd2.size() - 1; i >= 0; i--) {
    if (nd2[i] == 0)
      cout << "LM" << endl;
    else if (nd2[i] == 1)
      cout << "LW" << endl;
    else if (nd2[i] == 2)
      cout << "MW" << endl;
  }
}
void Dfs1(int d, int R, long long x, long long y, long long z, int s) {
  if (d > R) {
    pair<int, int> pr(x - y, x - z);
    if (hs.find(pr) != hs.end()) {
      if (ans < x + hsV[pr]) {
        st1 = s, st2 = hs[pr];
        ans = x + hsV[pr];
      }
    }
    return;
  }
  Dfs1(d + 1, R, x + l[d], y + m[d], z, s * 3 + 0);
  Dfs1(d + 1, R, x + l[d], y, z + w[d], s * 3 + 1);
  Dfs1(d + 1, R, x, y + m[d], z + w[d], s * 3 + 2);
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> l[i] >> m[i] >> w[i];
  if (n == 1) {
    int cnt = 0;
    if (l[1] == 0) cnt++;
    if (m[1] == 0) cnt++;
    if (w[1] == 0) cnt++;
    if (cnt < 2)
      cout << "Impossible" << endl;
    else {
      if (l[1] == m[1] && l[1] == 0)
        cout << "LM" << endl;
      else if (l[1] == w[1] && l[1] == 0)
        cout << "LW" << endl;
      else
        cout << "MW" << endl;
    }
    return 0;
  }
  dp[n] = max(l[n], 0);
  for (int i = n - 1; i >= 1; i--) dp[i] = max(dp[i + 1], dp[i + 1] + l[i]);
  int mid = (n + 1) >> 1;
  Dfs2(mid + 1, n, 0, 0, 0, 0);
  Dfs1(1, mid, 0, 0, 0, 0);
  if (ans == -INF)
    cout << "Impossible" << endl;
  else {
    Print(st1, st2);
  }
  return 0;
}
