#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const int INF = (1 << 30) - 1;
const int MAXN = 30;
int n, top;
int tb1[2000010], tb2[2000010];
map<int, pair<int, int> > mp1;
map<int, pair<int, int> >::iterator it;
map<pair<int, int>, int> mp2;
int V[MAXN][3];
void Dfs(int id, int p, int v, int base, int s1, int s2, int s3) {
  if (p > top) {
    if (id == 0) {
      mp1[v] = make_pair(s2 - s1, s3 - s1);
      tb1[v] = s1;
    } else {
      mp2[make_pair(s2 - s1, s3 - s1)] = v;
      tb2[v] = s1;
    }
    return;
  }
  Dfs(id, p + 1, v, base * 3, s1, s2 + V[p][1], s3 + V[p][2]);
  Dfs(id, p + 1, v + base, base * 3, s1 + V[p][0], s2, s3 + V[p][2]);
  Dfs(id, p + 1, v + (base << 1), base * 3, s1 + V[p][0], s2 + V[p][1], s3);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j < 3; ++j) {
      scanf("%d", &V[i][j]);
    }
  }
  if (n == 1) {
    if (V[1][1] == 0 && V[1][2] == 0)
      printf("MW\n");
    else if (V[1][0] == 0 && V[1][2] == 0)
      printf("LW\n");
    else if (V[1][0] == 0 && V[1][1] == 0)
      printf("LM\n");
    else
      printf("Impossible\n");
    return 0;
  }
  top = n / 2;
  Dfs(0, 1, 0, 1, 0, 0, 0);
  top = n;
  Dfs(1, n / 2 + 1, 0, 1, 0, 0, 0);
  int ans = -1, st1, st2;
  for (it = mp1.begin(); it != mp1.end(); ++it) {
    pair<int, int> cur = (*it).second;
    cur.first = -cur.first;
    cur.second = -cur.second;
    if (mp2.find(cur) == mp2.end()) continue;
    int it2 = mp2[cur];
    int sum = tb1[(*it).first] + tb2[it2];
    if (ans == -1 || sum > ans) {
      ans = sum;
      st1 = (*it).first;
      st2 = it2;
    }
  }
  if (ans == -1)
    printf("Impossible\n");
  else {
    int cnt = n / 2;
    while (cnt--) {
      int cur = st1 % 3;
      if (cur == 0)
        printf("MW\n");
      else if (cur == 1)
        printf("LW\n");
      else
        printf("LM\n");
      st1 /= 3;
    }
    cnt = n - n / 2;
    while (cnt--) {
      int cur = st2 % 3;
      if (cur == 0)
        printf("MW\n");
      else if (cur == 1)
        printf("LW\n");
      else
        printf("LM\n");
      st2 /= 3;
    }
  }
  return 0;
}
