#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 25 + 5;
map<pair<int, int>, pair<int, vector<char> > > mp;
int n;
int arr[N][4];
int limit[2];
vector<char> v;
bool meen;
int a, b, c;
int mx = -2e9;
vector<char> vv, vv2;
void solve(int i) {
  if (i == limit[meen]) {
    if (!meen) {
      if ((mp.find({a - b, b - c}) == mp.end() || mp[{a - b, b - c}].first < a))
        mp[{a - b, b - c}] = {a, v};
    } else {
      if (mp.find({b - a, c - b}) != mp.end() &&
          (mp[{b - a, c - b}].second.size() == n / 2 * 2)) {
        if (mp[{b - a, c - b}].first + a > mx) {
          mx = mp[{b - a, c - b}].first + a;
          vv = mp[{b - a, c - b}].second;
          vv2 = v;
        }
      }
    }
    return;
  }
  a += arr[i][1];
  b += arr[i][2];
  v.push_back('L');
  v.push_back('M');
  solve(i + 1);
  v.pop_back();
  v.pop_back();
  a -= arr[i][1];
  b -= arr[i][2];
  a += arr[i][1];
  c += arr[i][3];
  v.push_back('L');
  v.push_back('W');
  solve(i + 1);
  v.pop_back();
  v.pop_back();
  a -= arr[i][1];
  c -= arr[i][3];
  b += arr[i][2];
  c += arr[i][3];
  v.push_back('M');
  v.push_back('W');
  solve(i + 1);
  v.pop_back();
  v.pop_back();
  b -= arr[i][2];
  c -= arr[i][3];
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= 3; j++) {
      scanf("%d", &arr[i][j]);
    }
  }
  limit[0] = n / 2 + 1;
  limit[1] = n + 1;
  solve(1);
  meen = 1;
  solve(n / 2 + 1);
  if (mx == -2e9)
    printf("Impossible");
  else {
    for (int i = 0; i < vv.size(); i += 2) {
      printf("%c%c\n", vv[i], vv[i + 1]);
    }
    for (int i = 0; i < vv2.size(); i += 2) {
      printf("%c%c\n", vv2[i], vv2[i + 1]);
    }
  }
  return 0;
}
