#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> l(n), m(n), w(n);
  map<pair<long long, long long>, pair<int, long long> > mp;
  for (int i = 0; i < n; i++) scanf("%d %d %d", &l[i], &m[i], &w[i]);
  for (int i = 0; i < pow(3, n / 2); i++) {
    long long a = 0, b = 0, c = 0;
    int t = i;
    for (int j = 0; j < (n / 2); j++) {
      if (t % 3 == 0) {
        a += l[j];
        b += m[j];
      } else if (t % 3 == 1) {
        a += l[j];
        c += w[j];
      } else {
        b += m[j];
        c += w[j];
      }
      t /= 3;
    }
    map<pair<long long, long long>, pair<int, long long> >::iterator iter =
        mp.find(make_pair(b - a, c - b));
    if (iter == mp.end())
      mp.insert(make_pair(make_pair(b - a, c - b), make_pair(i, a)));
    else if ((iter->second).second < a)
      (iter->second) = make_pair(i, a);
  }
  int result_str1 = 0;
  int result_str2 = 0;
  long long result_mx = -2000000000;
  for (int i = 0; i < pow(3, (n + 1) / 2); i++) {
    long long a = 0, b = 0, c = 0;
    int t = i;
    for (int j = 0; j < ((n + 1) / 2); j++) {
      if (t % 3 == 0) {
        a += l[(n / 2) + j];
        b += m[(n / 2) + j];
      } else if (t % 3 == 1) {
        a += l[(n / 2) + j];
        c += w[(n / 2) + j];
      } else {
        b += m[(n / 2) + j];
        c += w[(n / 2) + j];
      }
      t /= 3;
    }
    map<pair<long long, long long>, pair<int, long long> >::iterator iter =
        mp.find(make_pair(a - b, b - c));
    if (iter != mp.end()) {
      long long result_mx_here = a + (iter->second).second;
      if (result_mx_here > result_mx) {
        result_str1 = (iter->second).first;
        result_str2 = i;
        result_mx = result_mx_here;
      }
    }
  }
  if (result_mx == -2000000000)
    printf("Impossible");
  else {
    for (int i = 0; i < (n / 2); i++) {
      if (result_str1 % 3 == 0)
        printf("LM\n");
      else if (result_str1 % 3 == 1)
        printf("LW\n");
      else
        printf("MW\n");
      result_str1 /= 3;
    }
    for (int i = 0; i < ((n + 1) / 2); i++) {
      if (result_str2 % 3 == 0)
        printf("LM\n");
      else if (result_str2 % 3 == 1)
        printf("LW\n");
      else
        printf("MW\n");
      result_str2 /= 3;
    }
  }
}
