#include <bits/stdc++.h>
using namespace std;
const int MAX_BUF_SIZE = 16384;
char BUFOR[MAX_BUF_SIZE];
int BUF_SIZE, BUF_POS;
char ZZZ;
const int MXN = 1000010;
const int C = 262144;
const int INF = 1000000001;
int a[MXN][3];
int n;
vector<pair<pair<int, int>, pair<int, int> > > c[2];
vector<int> b[2];
map<pair<int, int>, int> M;
map<pair<int, int>, int> maski;
void test() {
  scanf("%d", &n);
  for (int i = (1); i <= (n); i++)
    for (int j = (0); j <= (2); j++) scanf("%d", &a[i][j]);
  for (int i = (1); i <= (n / 2); i++) b[0].push_back(i);
  for (int i = (n / 2 + 1); i <= (n); i++) b[1].push_back(i);
  for (int o = (0); o <= (1); o++) {
    int N = (int)(b[o]).size();
    for (int j = (0); j <= (pow(3, N) - 1); j++) {
      int tmp = j;
      int d[3] = {0, 0, 0};
      int iter = 0;
      for (int _ = (0); _ <= (N - 1); _++) {
        for (int u = (0); u <= (2); u++)
          if (u != (tmp % 3)) d[u] += a[b[o][iter]][u];
        tmp /= 3;
        iter++;
      }
      c[o].push_back(make_pair(make_pair(j, d[0]), make_pair(d[1], d[2])));
    }
  }
  vector<pair<pair<int, int>, pair<int, int> > > vec, vec2;
  for (__typeof((c[1]).begin()) it = ((c[1]).begin()); it != (c[1]).end();
       ++it) {
    int mask = (*it).first.first;
    int A = (*it).first.second;
    int B = (*it).second.first;
    int C = (*it).second.second;
    vec.push_back(make_pair(make_pair(B - A, C - B), make_pair(C, mask)));
  }
  sort((vec).begin(), (vec).end());
  for (int i = (0); i <= ((int)(vec).size() - 1); i++) {
    int iter = i;
    while (vec[i].first == vec[iter].first && iter < (int)(vec).size()) iter++;
    vec2.push_back(vec[iter - 1]);
    i = iter - 1;
  }
  int res = -INF;
  int mask1 = 0, mask2 = 0;
  for (__typeof((c[0]).begin()) it = ((c[0]).begin()); it != (c[0]).end();
       ++it) {
    int AB = (*it).first.second - (*it).second.first;
    int BC = (*it).second.first - (*it).second.second;
    int it2 = lower_bound((vec2).begin(), (vec2).end(),
                          make_pair(make_pair(AB, BC), make_pair(-INF, -INF))) -
              vec2.begin();
    if (it2 == (int)(vec2).size()) continue;
    pair<int, int> p1 = vec2[it2].first;
    pair<int, int> p2 = vec2[it2].second;
    if (p1 == make_pair(AB, BC)) {
      int tmp = (*it).second.second + p2.first;
      if (tmp > res) {
        mask1 = (*it).first.first;
        mask2 = p2.second;
        res = tmp;
      }
    }
  }
  if (res == -INF) {
    printf("Impossible\n");
    return;
  }
  char zn[3] = {'L', 'M', 'W'};
  for (int i = (1); i <= (n / 2); i++) {
    for (int o = (0); o <= (2); o++)
      if (o != (mask1 % 3)) printf("%c", zn[o]);
    printf("\n");
    mask1 /= 3;
  }
  for (int i = (n / 2 + 1); i <= (n); i++) {
    for (int o = (0); o <= (2); o++)
      if (o != (mask2 % 3)) printf("%c", zn[o]);
    printf("\n");
    mask2 /= 3;
  }
}
int main() {
  int te = 1;
  while (te--) test();
  return 0;
}
