#include <bits/stdc++.h>
using namespace std;
const long long inf = 27;
long long n, a[inf], b[inf], c[inf], ans = -1e9;
vector<long long> res;
map<pair<long long, long long>, pair<long long, vector<long long> > > mp;
vector<long long> mask;
void btadd(long long pos, long long sum1, long long sum2, long long sum3) {
  if (pos == n / 2) {
    long long id1 = sum2 - sum1, id2 = sum3 - sum1;
    pair<long long, long long> id = make_pair(id1, id2);
    if (mp.find(id) == mp.end())
      mp[id] = make_pair(sum1, mask);
    else
      mp[id] = max(mp[id], make_pair(sum1, mask));
    return;
  }
  mask.push_back(1);
  btadd(pos + 1, sum1, sum2 + b[pos], sum3 + c[pos]);
  mask.pop_back();
  mask.push_back(2);
  btadd(pos + 1, sum1 + a[pos], sum2, sum3 + c[pos]);
  mask.pop_back();
  mask.push_back(3);
  btadd(pos + 1, sum1 + a[pos], sum2 + b[pos], sum3);
  mask.pop_back();
}
vector<long long> merge(vector<long long> x, vector<long long> y) {
  for (auto o : y) x.push_back(o);
  return x;
}
void bt(long long pos, long long sum1, long long sum2, long long sum3) {
  if (pos == n + 1) {
    long long id1 = sum1 - sum2, id2 = sum1 - sum3;
    pair<long long, long long> id = make_pair(id1, id2);
    if (mp.find(id) == mp.end()) return;
    if (mp[id].first + sum1 > ans)
      ans = mp[id].first + sum1, res = merge(mp[id].second, mask);
    return;
  }
  mask.push_back(1);
  bt(pos + 1, sum1, sum2 + b[pos], sum3 + c[pos]);
  mask.pop_back();
  mask.push_back(2);
  bt(pos + 1, sum1 + a[pos], sum2, sum3 + c[pos]);
  mask.pop_back();
  mask.push_back(3);
  bt(pos + 1, sum1 + a[pos], sum2 + b[pos], sum3);
  mask.pop_back();
}
int main() {
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> a[i] >> b[i] >> c[i];
  if (n == 1) {
    if ((a[1] == 0 && b[1] == 0)) cout << "LM" << endl, exit(0);
    if (a[1] == 0 && c[1] == 0) cout << "LW" << endl, exit(0);
    if (b[1] == 0 && c[1] == 0) cout << "MW" << endl, exit(0);
    cout << "Impossible" << endl;
    exit(0);
  }
  btadd(1, 0, 0, 0);
  bt(n / 2, 0, 0, 0);
  if (res.empty()) cout << "Impossible" << endl, exit(0);
  for (int i = 1; i <= n; i++)
    if (res[i - 1] == 1)
      cout << "MW" << endl;
    else if (res[i - 1] == 2)
      cout << "LW" << endl;
    else
      cout << "LM" << endl;
}
