#include <bits/stdc++.h>
using namespace std;
const int inft = 1000000009;
const int MAXN = 1000006;
int W[30][3], sum[3];
vector<pair<pair<int, int>, pair<int, string> > > A, B, C;
int pocz, koniec;
char S[123];
int bil[3];
string XX = "LMW";
void go(int p) {
  if (p == koniec) {
    A.push_back(pair<pair<int, int>, pair<int, string> >(
        pair<int, int>(bil[1] - bil[0], bil[2] - bil[0]),
        make_pair(bil[0], string(S + pocz, S + koniec))));
    return;
  }
  for (int i = 0; i < (3); ++i) {
    bil[i] += W[p][i];
    S[p] = XX[i];
    go(p + 1);
    bil[i] -= W[p][i];
  }
}
int znajdz(pair<int, int> a) {
  int p = 0, k = C.size();
  while (p + 1 < k) {
    int m = (p + k) / 2;
    if (C[m].first > a)
      k = m;
    else
      p = m;
  }
  if (C[p].first != a) return -1;
  return p;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < (n); ++i)
    for (int j = 0; j < (3); ++j) scanf("%d", &W[i][j]);
  for (int i = 0; i < (n); ++i)
    for (int j = 0; j < (3); ++j) sum[j] += W[i][j];
  pocz = n / 2;
  koniec = n;
  go(pocz);
  ;
  for (typeof((A).begin()) it = (A).begin(); it != (A).end(); ++it)
    ;
  swap(B, A);
  pocz = 0;
  koniec = n / 2;
  go(pocz);
  ;
  for (typeof((A).begin()) it = (A).begin(); it != (A).end(); ++it)
    ;
  sort((A).begin(), (A).end());
  for (typeof((A).begin()) it = (A).begin(); it != (A).end(); ++it)
    if (C.empty() || it->first != C.back().first) C.push_back(*it);
  int ret = 0;
  string jak = "";
  pair<int, int> cel(sum[1] - sum[0], sum[2] - sum[0]);
  for (typeof((B).begin()) it = (B).begin(); it != (B).end(); ++it) {
    pair<int, int> co(cel.first - it->first.first,
                      cel.second - it->first.second);
    int e = znajdz(co);
    if (e == -1) continue;
    int s = it->second.first + C[e].second.first;
    ;
    if (jak == "" || ret > s) {
      ret = s;
      jak = C[e].second.second + it->second.second;
    }
  }
  if (jak == "") {
    printf("Impossible\n");
    return 0;
  };
  for (int i = 0; i < (n); ++i) {
    for (typeof((XX).begin()) it = (XX).begin(); it != (XX).end(); ++it)
      if (jak[i] != *it) printf("%c", *it);
    printf("\n");
  }
  return 0;
}
