#include <bits/stdc++.h>
using namespace std;
const int N = 30;
int n;
int a[3][N];
map<pair<int, int>, pair<int, int> > m;
map<pair<int, int>, int> m2;
int ans = -2e9;
int ans1, ans2;
long long mov1, mov2;
pair<int, int> max_p;
vector<int> res;
int cnt = 0;
void gen(int type, int pos, int r, vector<int> t, long long moves) {
  if (pos == r) {
    if (!type) {
      pair<int, int> p = make_pair(t[0] - t[1], t[1] - t[2]);
      if (m.count(p)) {
        if (t[0] > m[p].first) {
          m[p] = make_pair(t[0], moves);
        }
      } else {
        m[p] = make_pair(t[0], moves);
      }
    } else {
      pair<int, int> p = make_pair(t[1] - t[0], t[2] - t[1]);
      if (!m.count(p)) return;
      if (m2.count(p))
        m2[p] = max(m2[p], t[0]);
      else
        m2[p] = t[0];
      int v1 = m[p].first;
      int v2 = m2[p];
      int movz1 = m[p].second;
      if (v1 + v2 > ans) {
        ans = v1 + v2;
        ans1 = v1;
        ans2 = v2;
        mov1 = movz1;
        mov2 = moves;
        max_p = p;
      }
    }
    return;
  }
  for (int i = 0; i < 3; i++) {
    t[i] += a[i][pos];
  }
  for (int i = 0; i < 3; i++) {
    t[i] -= a[i][pos];
    moves = moves * 3 + i;
    gen(type, pos + 1, r, t, moves);
    moves /= 3;
    t[i] += a[i][pos];
  }
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 3; j++) {
      cin >> a[j][i];
    }
  }
  vector<int> t(3, 0);
  gen(0, 0, n / 2, t, 0);
  gen(1, n / 2, n, t, 0);
  for (int i = 0; i < n - n / 2; i++) {
    res.push_back(mov2 % 3);
    mov2 /= 3;
  }
  for (int i = 0; i < n / 2; i++) {
    res.push_back(mov1 % 3);
    mov1 /= 3;
  }
  if (ans <= -2e9) {
    cout << "Impossible" << endl;
    return 0;
  }
  reverse(res.begin(), res.end());
  for (int i = 0; i < res.size(); i++) {
    if (res[i] == 0) {
      cout << "MW" << endl;
    } else if (res[i] == 1) {
      cout << "LW" << endl;
    } else if (res[i] == 2) {
      cout << "LM" << endl;
    }
  }
  return 0;
}
