#include <bits/stdc++.h>
using namespace std;
const int _N = 30;
const int _S = 1600000;
class Save {
 public:
  int v0, w0, u0, State;
} Stack[_S];
int n, a[_N], b[_N], c[_N], top;
int ans1, ans2, ans3;
inline bool operator<(const Save &i, const Save &j) {
  static int p1, p2, p3, p4;
  p1 = i.v0 - i.w0, p2 = i.v0 - i.u0;
  p3 = j.v0 - j.w0, p4 = j.v0 - j.u0;
  if (p1 == p3) return p2 < p4;
  return p1 < p3;
}
inline bool operator==(const Save &i, const Save &j) {
  static int p1, p2, p3, p4;
  p1 = i.v0 - i.w0, p2 = i.v0 - i.u0;
  p3 = j.v0 - j.w0, p4 = j.v0 - j.u0;
  if (p1 == p3 && p2 == p4) return true;
  return false;
}
int Find(int x0, int y0, int z0) {
  static Save Use;
  static int L, R;
  L = 1, R = top, Use.v0 = x0, Use.w0 = y0, Use.u0 = z0;
  while (L <= R) {
    static int M;
    M = L + R >> 1;
    if (Stack[M] < Use)
      L = M + 1;
    else
      R = M - 1;
  }
  if (Stack[L] == Use) return L;
  return 0;
}
void P(int Po) {
  if (Po == 0) printf("MW\n");
  if (Po == 1) printf("LW\n");
  if (Po == 2) printf("LM\n");
}
void Print1(int Po) {
  static int XD[_N], i;
  for (i = 1; i << 1 <= n; i++) XD[i] = Po % 3, Po /= 3;
  --i;
  for (; i > 0; i--) P(XD[i]);
}
void Print2(int Po) {
  static int i;
  for (i = n; i << 1 > n; i--) P(Po % 3), Po /= 3;
}
void Dfs1(int pla, int x, int y, int z, int s) {
  if (pla << 1 > n) {
    Stack[++top].v0 = x, Stack[top].w0 = y, Stack[top].u0 = z,
    Stack[top].State = s;
    return;
  }
  Dfs1(pla + 1, x + a[pla], y + b[pla], z, (s << 1) + s + 2);
  Dfs1(pla + 1, x + a[pla], y, z + c[pla], (s << 1) + s + 1);
  Dfs1(pla + 1, x, y + b[pla], z + c[pla], (s << 1) + s);
}
void Dfs2(int pla, int x, int y, int z, int s) {
  if (pla << 1 <= n) {
    static int Get;
    Get = Find(-x, -y, -z);
    if (!Get) return;
    if (x + Stack[Get].v0 > ans1)
      ans1 = x + Stack[Get].v0, ans2 = Stack[Get].State, ans3 = s;
    return;
  }
  Dfs2(pla - 1, x + a[pla], y + b[pla], z, (s << 1) + s + 2);
  Dfs2(pla - 1, x + a[pla], y, z + c[pla], (s << 1) + s + 1);
  Dfs2(pla - 1, x, y + b[pla], z + c[pla], (s << 1) + s);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d%d", a + i, b + i, c + i);
  Dfs1(1, 0, 0, 0, 0);
  sort(Stack + 1, Stack + top + 1);
  ans1 = -1000000000;
  Dfs2(n, 0, 0, 0, 0);
  if (ans1 == -1000000000)
    printf("Impossible\n");
  else
    Print1(ans2), Print2(ans3);
  return 0;
}
