#include <bits/stdc++.h>
using namespace std;
const int INF = 2147483647;
const long long INFL = 9223372036854775807LL;
const double EPSILON = 0.00000001;
const long long MOD = 1000000007;
int vals[25][3];
map<pair<int, int>, pair<int, string>> poss_sums;
void solve1(string asgn, int i, int a, int b, int c, int n) {
  if (i == n / 2) {
    pair<int, int> key = {b - a, c - b};
    if (poss_sums.find(key) == poss_sums.end() or poss_sums[key].first < a) {
      poss_sums[key] = {a, asgn};
    }
  } else {
    solve1(asgn + "LM\n", i + 1, a + vals[i][0], b + vals[i][1], c, n);
    solve1(asgn + "MW\n", i + 1, a, b + vals[i][1], c + vals[i][2], n);
    solve1(asgn + "LW\n", i + 1, a + vals[i][0], b, c + vals[i][2], n);
  }
}
string ans = "";
int best = -INF;
void solve2(string asgn, int i, int a, int b, int c, int n) {
  if (i == n) {
    pair<int, int> target = {a - b, b - c};
    if (poss_sums.find(target) != poss_sums.end()) {
      int val = a + poss_sums[target].first;
      if (val > best) {
        best = val;
        ans = poss_sums[target].second + asgn;
      }
    }
  } else {
    solve2(asgn + "LM\n", i + 1, a + vals[i][0], b + vals[i][1], c, n);
    solve2(asgn + "MW\n", i + 1, a, b + vals[i][1], c + vals[i][2], n);
    solve2(asgn + "LW\n", i + 1, a + vals[i][0], b, c + vals[i][2], n);
  }
}
int32_t main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 3; j++) scanf("%d", &vals[i][j]);
    ;
  }
  solve1("", 0, 0, 0, 0, n);
  solve2("", n / 2, 0, 0, 0, n);
  if (ans.length() == 0) {
    cout << "Impossible" << endl;
  } else
    cout << ans << endl;
  return 0;
}
