#include <bits/stdc++.h>
using namespace std;
const int N = 30;
const int inf = 0x3f3f3f3f;
int n;
int l[N], m[N], w[N];
map<pair<int, int>, int> mp;
map<pair<int, int>, vector<char>> first;
vector<char> cur;
void gera(int i, int a, int b, int c) {
  if (i == n / 2) {
    pair<int, int> p = {a - b, b - c};
    if (!mp.count(p)) {
      mp[p] = a;
      first[p] = cur;
    } else {
      int old = mp[p];
      if (a > old) {
        mp[p] = a;
        first[p] = cur;
      }
    }
    return;
  }
  cur.push_back(0);
  gera(i + 1, a + l[i], b + m[i], c);
  cur.pop_back();
  cur.push_back(1);
  gera(i + 1, a + l[i], b, c + w[i]);
  cur.pop_back();
  cur.push_back(2);
  gera(i + 1, a, b + m[i], c + w[i]);
  cur.pop_back();
}
int ans = -inf;
vector<char> steps;
void responde(int i, int a, int b, int c) {
  if (i == n) {
    pair<int, int> p = {b - a, c - b};
    if (!mp.count(p)) return;
    int oa = mp[p];
    if (a + oa > ans) {
      steps = first[p];
      steps.insert(steps.end(), cur.begin(), cur.end());
      ans = a + oa;
    }
    return;
  }
  cur.push_back(0);
  responde(i + 1, a + l[i], b + m[i], c);
  cur.pop_back();
  cur.push_back(1);
  responde(i + 1, a + l[i], b, c + w[i]);
  cur.pop_back();
  cur.push_back(2);
  responde(i + 1, a, b + m[i], c + w[i]);
  cur.pop_back();
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> l[i] >> m[i] >> w[i];
  gera(0, 0, 0, 0);
  responde(n / 2, 0, 0, 0);
  if (!steps.size()) {
    cout << "Impossible" << endl;
    return 0;
  }
  for (char c : steps) {
    if (c == 0)
      cout << "LM" << endl;
    else if (c == 1)
      cout << "LW" << endl;
    else
      cout << "MW" << endl;
  }
}
