#include <bits/stdc++.h>
using namespace std;
const int maxn = 25;
const int inf = 1000000000;
int main() {
  int n;
  scanf("%d", &n);
  int n1 = n / 2;
  int n2 = n - n1;
  vector<int> pow3(n2 + 1);
  pow3[0] = 1;
  for (int i = 1; i <= n2; i++) pow3[i] = 3 * pow3[i - 1];
  int d[maxn][3];
  for (int i = 0; i < n; i++) {
    scanf("%d %d %d", &d[i][0], &d[i][1], &d[i][2]);
  }
  map<pair<int, int>, int> m;
  vector<int> value(pow3[n1]);
  for (int i = 0; i < pow3[n1]; i++) {
    int tmp = i;
    int sum[3] = {};
    for (int j = 0; j < n1; j++) {
      int digit = tmp % 3;
      tmp /= 3;
      sum[0] += d[j][0];
      sum[1] += d[j][1];
      sum[2] += d[j][2];
      sum[digit] -= d[j][digit];
    }
    pair<int, int> p(sum[0] - sum[1], sum[1] - sum[2]);
    map<pair<int, int>, int>::iterator it = m.find(p);
    ;
    value[i] = sum[0];
    if (it == m.end()) {
      m[p] = i;
    } else {
      if (sum[0] > value[it->second])
        it->second = i;
      else if (sum[0] == value[it->second]) {
        int num1 = i;
        int num2 = it->second;
        for (int k = 0; k < n1; k++) {
          if (num1 % 3 > num2 % 3) {
            it->second = i;
            break;
          }
          num1 /= 3;
          num2 /= 3;
        }
      }
    }
  }
  int ans_value = -inf;
  pair<int, int> ans;
  for (int i = 0; i < pow3[n2]; i++) {
    int tmp = i;
    int sum[3] = {};
    for (int j = n1; j < n; j++) {
      int digit = tmp % 3;
      tmp /= 3;
      sum[0] += d[j][0];
      sum[1] += d[j][1];
      sum[2] += d[j][2];
      sum[digit] -= d[j][digit];
    }
    pair<int, int> p(sum[1] - sum[0], sum[2] - sum[1]);
    map<pair<int, int>, int>::iterator it = m.find(p);
    ;
    if (it != m.end()) {
      int _ans = sum[0] + value[it->second];
      if (_ans > ans_value) {
        ans_value = _ans;
        ans = pair<int, int>(it->second, i);
      } else if (_ans == ans_value) {
        int num1 = it->second;
        int num2 = ans.first;
        for (int k = 0; k < n1; k++) {
          if (num1 % 3 > num2 % 3) {
            ans = pair<int, int>(it->second, i);
            break;
          }
          num1 /= 3;
          num2 /= 3;
        }
        num1 = i;
        num2 = ans.second;
        for (int k = 0; k < n2; k++) {
          if (num1 % 3 > num2 % 3) {
            ans = pair<int, int>(it->second, i);
            break;
          }
          num1 /= 3;
          num2 /= 3;
        }
      }
    }
  }
  if (ans_value == -inf) {
    puts("Impossible");
  } else {
    for (int i = 0; i < n1; i++) {
      int digit = ans.first % 3;
      ans.first /= 3;
      if (digit == 0) puts("MW");
      if (digit == 1) puts("LW");
      if (digit == 2) puts("LM");
    }
    for (int i = n1; i < n; i++) {
      int digit = ans.second % 3;
      ans.second /= 3;
      if (digit == 0) puts("MW");
      if (digit == 1) puts("LW");
      if (digit == 2) puts("LM");
    }
  }
  return 0;
}
