#include <bits/stdc++.h>
using namespace std;
const int N = 25, inf = 1000000000;
int n, g1, g2, a[3][N + 1];
map<pair<int, int>, pair<int, int> > Map;
int main() {
  scanf("%d", &n);
  g1 = n / 2;
  g2 = n - g1;
  for (int i = 1; i <= n; i++) {
    scanf("%d %d %d", a[0] + i, a[1] + i, a[2] + i);
  }
  int to = 1;
  for (int i = 0; i < g1; i++) to = to * 3;
  for (int mask = 0; mask < to; mask++) {
    int sum[3] = {};
    for (int i = 1, tmask = mask; i <= g1; i++, tmask /= 3) {
      for (int j = 0; j < 3; j++)
        if (j != tmask % 3) sum[j] += a[j][i];
    }
    pair<int, int> t = make_pair(sum[0] - sum[1], sum[1] - sum[2]);
    if (Map.find(t) != Map.end())
      Map[t] = max(Map[t], make_pair(sum[0], mask));
    else
      Map[t] = make_pair(sum[0], mask);
  }
  to = 1;
  for (int i = 0; i < g2; i++) to = to * 3;
  pair<int, pair<int, int> > ans = make_pair(-inf, make_pair(0, 0));
  for (int mask = 0; mask < to; mask++) {
    int sum[3] = {};
    for (int i = 1, tmask = mask; i <= g2; i++, tmask /= 3) {
      for (int j = 0; j < 3; j++)
        if (j != tmask % 3) sum[j] += a[j][i + g1];
    }
    pair<int, int> t = make_pair(sum[1] - sum[0], sum[2] - sum[1]);
    if (Map.find(t) != Map.end()) {
      ans = max(ans, make_pair(sum[0] + Map[t].first,
                               make_pair(Map[t].second, mask)));
    }
  }
  if (ans.first > -inf) {
    for (int tmask = ans.second.first, i = 1; i <= g1; tmask /= 3, i++) {
      if (tmask % 3 == 0)
        printf("MW\n");
      else if (tmask % 3 == 1)
        printf("LW\n");
      else
        printf("LM\n");
    }
    for (int tmask = ans.second.second, i = 1; i <= g2; tmask /= 3, i++) {
      if (tmask % 3 == 0)
        printf("MW\n");
      else if (tmask % 3 == 1)
        printf("LW\n");
      else
        printf("LM\n");
    }
  } else
    puts("Impossible");
  return 0;
}
