#include <bits/stdc++.h>
const int INF = 2147483647;
const int MOD = 1000000007;
const long long INF64 = 9223372036854775807;
using namespace std;
vector<pair<pair<int, int>, pair<int, string> > > s;
int l[25], m[25], w[25];
int res = -INF;
string ans = "Impossible\n";
void check(int k, int a, int b, int c, int n, string cur) {
  if (k == n)
    s.push_back(make_pair(make_pair(a - b, b - c), make_pair(a, cur)));
  else {
    check(k + 1, a + l[k], b + m[k], c, n, cur + "LM");
    check(k + 1, a, b + m[k], c + w[k], n, cur + "MW");
    check(k + 1, a + l[k], b, c + w[k], n, cur + "LW");
  }
}
pair<int, string> find(int x, int y) {
  int l = 0, r = s.size() - 1;
  while (l < r - 1) {
    int m = (l + r) / 2;
    if (s[m].first.first < x)
      l = m;
    else
      r = m;
  }
  if (s[l].first.first != x && s[r].first.first != x)
    return make_pair(-INF, "");
  int l1 = (s[l].first.first == x ? l : r);
  l = 0, r = s.size() - 1;
  while (l < r - 1) {
    int m = (l + r) / 2;
    if (s[m].first.first <= x)
      l = m;
    else
      r = m;
  }
  int r1 = (s[r].first.first == x ? r : l);
  l = l1, r = r1;
  while (l < r - 1) {
    int m = (l + r) / 2;
    if (s[m].first.second <= y)
      l = m;
    else
      r = m;
  }
  if (s[l].first.second != y && s[r].first.second != y)
    return make_pair(-INF, "");
  return (s[r].first.second == y
              ? make_pair(s[r].second.first, s[r].second.second)
              : make_pair(s[l].second.first, s[l].second.second));
}
void check2(int k, int a, int b, int c, int n, string cur) {
  if (k == n) {
    vector<pair<pair<int, int>, pair<int, string> > >::iterator it =
        lower_bound((s).begin(), (s).end(),
                    make_pair(make_pair(b - a, c - b), make_pair(-INF, cur)));
    if (it != s.end() && it->first.first == b - a &&
        it->first.second == c - b && it->second.first + a > res) {
      res = it->second.first + a;
      ans = it->second.second + cur;
    }
  } else {
    check2(k + 1, a + l[k], b + m[k], c, n, cur + "LM");
    check2(k + 1, a, b + m[k], c + w[k], n, cur + "MW");
    check2(k + 1, a + l[k], b, c + w[k], n, cur + "LW");
  }
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d%d%d", l + i, m + i, w + i);
  int k = n / 2;
  check(0, 0, 0, 0, k, "");
  sort((s).begin(), (s).end());
  check2(k, 0, 0, 0, n, "");
  if (ans == "Impossible\n") {
    cout << ans;
    return 0;
  }
  for (int i = 0; i < ans.size(); i += 2) cout << ans[i] << ans[i + 1] << "\n";
  return 0;
}
