#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";
bool comp(pair<pair<int, int>, pair<int, string> > a,
          pair<pair<int, int>, pair<int, string> > b) {
  return (a.first.first == b.first.first
              ? (a.first.second == b.first.second
                     ? a.second.first > b.second.first
                     : a.first.second < b.first.second)
              : a.first.first < b.first.first);
}
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");
  }
}
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(), comp);
  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;
}
