#include <bits/stdc++.h>
using namespace std;
inline int IN() {
  int x = 0, ch = getchar(), f = 1;
  while (!isdigit(ch) && (ch != '-') && (ch != EOF)) ch = getchar();
  if (ch == '-') {
    f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 1) + (x << 3) + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int fr, bh, n, cnt, l[26], m[26], w[26];
int Ans1 = -1 << 30, Ans2, Ans3;
struct Opr {
  int bs, sc, td, seq;
  bool operator<(const Opr& x) const {
    return sc == x.sc ? (td == x.td ? bs < x.bs : td < x.td) : sc < x.sc;
  }
} a[600000];
int find(int sc, int td) {
  int l = 1, r = cnt;
  while (l < r) {
    int mid = l + r + 1 >> 1;
    if (a[mid].sc < sc || (a[mid].sc == sc && a[mid].td <= td))
      l = mid;
    else
      r = mid - 1;
  }
  if (a[l].sc == sc && a[l].td == td)
    return l;
  else
    return 0;
}
void DFS1(int now, int L, int M, int W, int seq) {
  if (!now) {
    a[++cnt] = (Opr){L, M - L, W - L, seq};
    return;
  }
  DFS1(now - 1, L + l[now], M + m[now], W, seq * 3);
  DFS1(now - 1, L + l[now], M, W + w[now], seq * 3 + 1);
  DFS1(now - 1, L, M + m[now], W + w[now], seq * 3 + 2);
}
void Solve(int Ans, int len) {
  for (int i = 1; i <= len; i++) {
    if (Ans % 3 == 0)
      puts("LM");
    else if (Ans % 3 == 1)
      puts("LW");
    else
      puts("MW");
    Ans /= 3;
  }
}
void DFS2(int now, int L, int M, int W, int seq) {
  if (now == fr) {
    int Ans = find(L - M, L - W);
    if (Ans && a[Ans].bs + L > Ans1) {
      Ans1 = a[Ans].bs + L;
      Ans2 = a[Ans].seq;
      Ans3 = seq;
    }
    return;
  }
  DFS2(now - 1, L + l[now], M + m[now], W, seq * 3);
  DFS2(now - 1, L + l[now], M, W + w[now], seq * 3 + 1);
  DFS2(now - 1, L, M + m[now], W + w[now], seq * 3 + 2);
}
int main() {
  n = IN();
  for (int i = 1; i <= n; i++) l[i] = IN(), m[i] = IN(), w[i] = IN();
  if (n == 1) {
    if (l[1] == m[1]) return puts("LM"), 0;
    if (l[1] == w[1]) return puts("LW"), 0;
    if (m[1] == w[1]) return puts("MW"), 0;
    return puts("Impossible"), 0;
  }
  fr = n / 2;
  DFS1(fr, 0, 0, 0, 0);
  sort(a + 1, a + cnt + 1);
  DFS2(n, 0, 0, 0, 0);
  if (Ans1 >= -3e8) {
    Solve(Ans2, fr);
    Solve(Ans3, n - fr);
  } else
    puts("Impossible");
}
