#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 1;
long long m[26][3], FN;
map<pair<long long, long long>, pair<long long, string> > ans;
vector<pair<long long, string> > answ;
string tri(int x, int sz) {
  string second = "";
  while (x != 0) {
    second += ((x % 3) + '0');
    x /= 3;
  }
  while (second.size() < sz) {
    second += '0';
  }
  return second;
}
void solve(long long n, bool pa) {
  for (int i = 0; i < pow(3, n); i++) {
    string p = tri(i, n);
    long long a = 0, b = 0, c = 0;
    for (int j = 0, k, x; j < p.size(); j++) {
      k = p[j] - '0';
      x = j + (pa ? FN : 0LL);
      if (!k)
        a += m[x][0], b += m[x][1];
      else if (k == 1)
        a += m[x][0], c += m[x][2];
      else
        b += m[x][1], c += m[x][2];
    }
    if (!pa) {
      if (!ans.count({a - b, b - c}))
        ans.insert({{a - b, b - c}, {a, p}});
      else if (ans[{a - b, b - c}].first < a)
        ans[{a - b, b - c}] = {a, p};
    } else {
      if (ans.count({b - a, c - b})) {
        answ.push_back(
            {ans[{b - a, c - b}].first + a, ans[{b - a, c - b}].second + p});
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long n;
  cin >> n;
  FN = n / 2;
  for (int i = 0; i < n; i++) cin >> m[i][0] >> m[i][1] >> m[i][2];
  solve(FN, 0), solve(FN + n % 2, 1);
  if (!answ.size())
    cout << "Impossible\n";
  else {
    sort(answ.begin(), answ.end());
    for (int i = 0; i < answ[answ.size() - 1].second.size(); i++) {
      long long it = answ[answ.size() - 1].second[i] - '0';
      if (!it)
        cout << "LM\n";
      else if (it == 1)
        cout << "LW\n";
      else
        cout << "MW\n";
    }
  }
}
