#include <bits/stdc++.h>
using namespace std;
int n, mat[26][3];
vector<pair<int, pair<pair<int, int>, string> > > x;
unordered_map<long long int, pair<int, string> > y2;
string s;
long long int key(pair<int, int> foo) {
  long long int a = foo.first, b = foo.second;
  return a * 1000010000 + b;
}
void build(int i, int a, int b, int c, int op) {
  if (i == n / 2 && !op) {
    pair<int, int> foo = pair<int, int>(a - b, b - c);
    x.push_back(pair<int, pair<pair<int, int>, string> >(
        a, pair<pair<int, int>, string>(foo, s)));
    return;
  }
  if (i == n) {
    pair<int, int> foo = pair<int, int>(b - a, c - b);
    if (y2.count(key(foo))) {
      pair<int, string> aux = y2[key(foo)];
      if (aux.first < a) {
        y2[key(foo)] = pair<int, string>(a, s);
      }
    } else
      y2[key(foo)] = pair<int, string>(a, s);
    return;
  }
  s += "0";
  build(i + 1, a + mat[i][0], b + mat[i][1], c, op);
  s.pop_back();
  s += "1";
  build(i + 1, a, b + mat[i][1], c + mat[i][2], op);
  s.pop_back();
  s += "2";
  build(i + 1, a + mat[i][0], b, c + mat[i][2], op);
  s.pop_back();
}
void solve() {
  string ans;
  int h = INT_MIN;
  for (int i = 0; i < x.size(); i++) {
    pair<int, int> foo = x[i].second.first;
    if (y2.count(key(foo))) {
      h = max(h, y2[key(foo)].first + x[i].first);
    }
  }
  for (int i = 0; i < x.size(); i++) {
    pair<int, int> foo = x[i].second.first;
    if (y2.count(key(foo))) {
      if (h == y2[key(foo)].first + x[i].first) {
        ans = x[i].second.second + y2[key(foo)].second;
        break;
      }
    }
  }
  if (ans.empty())
    cout << "Impossible\n";
  else {
    for (int i = 0; i < ans.size(); i++) {
      if (ans[i] == '0') cout << "LM\n";
      if (ans[i] == '1') cout << "MW\n";
      if (ans[i] == '2') cout << "LW\n";
    }
  }
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 3; j++) cin >> mat[i][j];
  }
  build(0, 0, 0, 0, 0);
  build(n / 2, 0, 0, 0, 1);
  solve();
}
