#include <bits/stdc++.h>
using namespace std;
struct State {
  long long x, y, a;
  int trace;
  bool operator<(const State &state) const {
    if (x == state.x) return y < state.y;
    return x < state.x;
  }
};
int n, m, a[50], b[50], c[50];
set<State> states;
long long maxA;
int trace1, trace2;
void gen(int i, int hi, long long sa, long long sb, long long sc, int trace) {
  if (i >= hi) {
    State t;
    t.x = sa - sb;
    t.y = sb - sc;
    t.a = sa;
    t.trace = trace;
    set<State>::iterator it = states.find(t);
    if (it != states.end()) {
      if (it->a < t.a) {
        states.erase(it);
        states.insert(t);
      }
    } else {
      states.insert(t);
    }
    return;
  }
  gen(i + 1, hi, sa, sb + b[i], sc + c[i], trace * 3);
  gen(i + 1, hi, sa + a[i], sb, sc + c[i], trace * 3 + 1);
  gen(i + 1, hi, sa + a[i], sb + b[i], sc, trace * 3 + 2);
}
void rec(int i, int hi, long long sa, long long sb, long long sc, int trace) {
  if (i >= hi) {
    State t;
    t.x = sb - sa;
    t.y = sc - sb;
    set<State>::iterator it = states.find(t);
    if (it != states.end() && it->a + sa > maxA) {
      maxA = it->a + sa;
      trace1 = it->trace;
      trace2 = trace;
    }
    return;
  }
  rec(i + 1, hi, sa, sb + b[i], sc + c[i], trace * 3);
  rec(i + 1, hi, sa + a[i], sb, sc + c[i], trace * 3 + 1);
  rec(i + 1, hi, sa + a[i], sb + b[i], sc, trace * 3 + 2);
}
void printTrace(int trace) {
  vector<int> ds;
  while (trace > 1) {
    ds.push_back(trace % 3);
    trace /= 3;
  }
  for (int i = (ds.size()) - 1; i >= 0; i--) {
    if (ds[i] == 0)
      puts("MW");
    else if (ds[i] == 1)
      puts("LW");
    else
      puts("LM");
  }
}
bool solve() {
  m = min(n / 2, 11);
  maxA = -10001112221000000LL;
  gen(0, m, 0, 0, 0, 1);
  rec(m, n, 0, 0, 0, 1);
  if (maxA == -10001112221000000LL) return false;
  printTrace(trace1);
  printTrace(trace2);
  return true;
}
int main() {
  scanf("%d", &n);
  for (int i = 0, _n = (n); i < _n; i++) scanf("%d %d %d", &a[i], &b[i], &c[i]);
  if (!solve()) puts("Impossible");
  return 0;
}
