#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long n, ret, retIdx1, retIdx2;
vector<int> input[3];
int lim1, lim2;
map<pair<long long, long long>, pair<long long, long long> > cans;
void dfs(vector<int> s, int idx, long long currIdx) {
  if (idx == lim1) {
    long long x = s[1] - s[0], y = s[2] - s[0];
    if (cans.count(make_pair(x, y))) {
      if (cans[make_pair(x, y)].first < s[0]) {
        cans[make_pair(x, y)] = make_pair(s[0], currIdx);
      }
    } else
      cans[make_pair(x, y)] = make_pair(s[0], currIdx);
    return;
  }
  for (int i = 0; i < (int)3; i++) {
    vector<int> tmp = s;
    for (int j = 0; j < (int)3; j++) {
      if (i == j) continue;
      tmp[j] += input[j][idx];
    }
    dfs(tmp, idx + 1, currIdx + (i << (idx * 2)));
  }
}
void dfs1(vector<int> s, int idx, long long currIdx) {
  if (idx == lim2) {
    long long x = s[1] - s[0], y = s[2] - s[0];
    if (cans.count(make_pair(-x, -y))) {
      if (ret < cans[make_pair(-x, -y)].first + s[0]) {
        ret = cans[make_pair(-x, -y)].first + s[0];
        retIdx1 = cans[make_pair(-x, -y)].second;
        retIdx2 = currIdx;
      }
    }
    return;
  }
  for (int i = 0; i < (int)3; i++) {
    vector<int> tmp = s;
    for (int j = 0; j < (int)3; j++) {
      if (i == j) continue;
      tmp[j] += input[j][idx];
    }
    dfs1(tmp, idx + 1, currIdx + (i << ((idx - lim1) * 2)));
  }
}
int main() {
  ret = -1000000000;
  cin >> n;
  lim1 = n / 2;
  lim2 = n;
  for (int i = 0; i < (int)3; i++) {
    input[i].resize(n);
  }
  for (int i = 0; i < (int)n; i++) {
    for (int j = 0; j < (int)3; j++) cin >> input[j][i];
  }
  if (n == 1) {
    if (input[0][0] == input[1][0]) {
      cout << "LM" << endl;
    } else if (input[0][0] == input[2][0]) {
      cout << "LW" << endl;
    } else if (input[1][0] == input[2][0]) {
      cout << "MW" << endl;
    } else {
      cout << "Impossible" << endl;
    }
    return 0;
  }
  vector<int> tmp(3, 0);
  dfs(tmp, 0, 0);
  dfs1(tmp, lim1, 0);
  if (ret == -1000000000) {
    cout << "Impossible" << endl;
    return 0;
  }
  for (int i = 0; i < (int)lim1; i++) {
    int idx = retIdx1 % 4;
    switch (idx) {
      case 0:
        cout << "MW" << endl;
        break;
      case 1:
        cout << "LW" << endl;
        break;
      case 2:
        cout << "LM" << endl;
        break;
    }
    retIdx1 >>= 2;
  }
  for (int i = lim1; i < (int)n; i++) {
    int idx = retIdx2 % 4;
    switch (idx) {
      case 0:
        cout << "MW" << endl;
        break;
      case 1:
        cout << "LW" << endl;
        break;
      case 2:
        cout << "LM" << endl;
        break;
    }
    retIdx2 >>= 2;
  }
  return 0;
}
