#include <bits/stdc++.h>
using namespace std;
int P[15];
const int M = (int)16e5;
int n, V[26][4];
struct node {
  long long v1, v2, v;
  int now;
  bool operator==(const node &_) const { return v1 == _.v1 && v2 == _.v2; }
  bool operator<(const node &_) const {
    if (v1 == _.v1) {
      if (v2 == _.v2) return v > _.v;
      return v2 < _.v2;
    }
    return v1 < _.v1;
  }
} A1[M], A2[M], B[M];
int n1, n2;
void solve(int L, int R, int p) {
  int len = R - L + 1;
  int n3 = 0;
  for (int i = (0), _t = (P[len] - 1); i <= _t; ++i) {
    long long v1 = 0, v2 = 0, v3 = 0;
    for (int j = (0), _t = (len - 1); j <= _t; ++j) {
      int p1 = i / P[j] % 3;
      if (p1 == 0) v1 += V[j + L][1], v2 += V[j + L][2];
      if (p1 == 1) v1 += V[j + L][1], v3 += V[j + L][3];
      if (p1 == 2) v2 += V[j + L][2], v3 += V[j + L][3];
    }
    B[++n3] = (node){v1 - v2, v1 - v3, v1, i};
  }
  sort(B + 1, B + 1 + n3);
  for (int i = (1), _t = (n3); i <= _t; ++i) {
    if (B[i] == B[i - 1]) continue;
    if (!p)
      A1[++n1] = B[i];
    else
      A2[++n2] = B[i];
  }
}
int main() {
  P[0] = 1;
  for (int i = (1), _t = (14); i <= _t; ++i) P[i] = P[i - 1] * 3;
  scanf("%d", &n);
  for (int i = (1), _t = (n); i <= _t; ++i) {
    for (int j = (1), _t = (3); j <= _t; ++j) {
      scanf("%d", &V[i][j]);
    }
  }
  if (n == 1) {
    if (V[1][1] == 0 && V[1][2] == 0)
      puts("LM");
    else if (V[1][1] == 0 && V[1][3] == 0)
      puts("LW");
    else if (V[1][2] == 0 && V[1][3] == 0)
      puts("MW");
    else
      puts("Impossible");
    return 0;
  }
  solve(1, n / 2, 0);
  solve(n / 2 + 1, n, 1);
  long long mx = -1e18;
  int a1 = 0, a2 = 0;
  for (int i = (1), _t = (n1); i <= _t; ++i) {
    node ned = (node){-A1[i].v1, -A1[i].v2, 0, 0};
    int x = lower_bound(A2 + 1, A2 + 1 + n2, ned) - A2;
    for (int j = (max(1, x - 1)), _t = (min(x + 1, n2)); j <= _t; ++j) {
      if (A2[j] == ned) {
        long long v = A1[i].v + A2[j].v;
        if (v > mx) mx = v, a1 = i, a2 = j;
      }
    }
  }
  if (a1 == 0)
    puts("Impossible");
  else {
    int L = 1, R = n / 2;
    for (int i = (0), _t = (R - L); i <= _t; ++i) {
      int p = A1[a1].now / P[i] % 3;
      if (p == 0) puts("LM");
      if (p == 1) puts("LW");
      if (p == 2) puts("MW");
    }
    L = n / 2 + 1, R = n;
    for (int i = (0), _t = (R - L); i <= _t; ++i) {
      int p = A2[a2].now / P[i] % 3;
      if (p == 0) puts("LM");
      if (p == 1) puts("LW");
      if (p == 2) puts("MW");
    }
  }
  return 0;
}
