#include <bits/stdc++.h>
using namespace std;
const int maxn = 5000;
long long x, y;
string s[30];
int nm[600000][25], n, k, mx, k1[600000], k2[600000], k3[600000], v, tp[500000],
    a[300], b[300], c[300];
struct sq {
  int l, m, w;
};
sq d[600000];
bool cmp(const sq &i, const sq &j) {
  if (i.l < j.l)
    return 1;
  else if (i.l == j.l && (i.m < j.m))
    return 1;
  else if (i.l == j.l && i.m == j.m && i.w < j.w)
    return 1;
  else
    return 0;
}
void go(int l, int r, int x, int y, int z, int k) {
  if (l > r) {
    v++;
    d[v].l = x - y;
    d[v].m = y - z;
    d[v].w = v;
    k1[v] = x;
    k2[v] = y;
    k3[v] = z;
    for (int i = 1; i <= k; i++) nm[v][i] = tp[i];
    return;
  }
  k++;
  tp[k] = 1;
  go(l + 1, r, x + a[l], y + b[l], z, k);
  tp[k] = 2;
  go(l + 1, r, x + a[l], y, z + c[l], k);
  tp[k] = 3;
  go(l + 1, r, x, y + b[l], z + c[l], k);
}
void go2(int l, int r, int x, int y, int z, int k) {
  if (l > r) {
    int ll = lower_bound(d + 1, d + v + 1, (sq){y - x, z - y, 0}, cmp) - d;
    if (ll == v + 1) return;
    if (x - y + d[ll].l == 0 && y - z + d[ll].m == 0) {
      if (k1[d[ll].w] + x > mx)
        mx = k1[d[ll].w] + x;
      else
        return;
      for (int i = 1; i <= n / 2; i++) {
        int x = d[ll].w;
        if (nm[x][i] == 1)
          s[i].assign("LM");
        else if (nm[x][i] == 2)
          s[i].assign("LW");
        else if (nm[x][i] == 3)
          s[i].assign("MW");
      }
      for (int i = 1; i <= n - n / 2; i++) {
        if (tp[i] == 1)
          s[i + n / 2].assign("LM");
        else if (tp[i] == 2)
          s[i + n / 2].assign("LW");
        else if (tp[i] == 3)
          s[i + n / 2].assign("MW");
      }
      return;
    }
    return;
  }
  k++;
  tp[k] = 1;
  go2(l + 1, r, x + a[l], y + b[l], z, k);
  tp[k] = 2;
  go2(l + 1, r, x + a[l], y, z + c[l], k);
  tp[k] = 3;
  go2(l + 1, r, x, y + b[l], z + c[l], k);
}
void build(int l, int r) {
  k = 0;
  go(l, r, 0, 0, 0, 0);
}
void build2(int l, int r) {
  k = 0;
  sort(d + 1, d + v + 1, cmp);
  go2(l, r, 0, 0, 0, 0);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i] >> b[i] >> c[i];
  if (n == 1) {
    if (a[1] == 0 && b[1] == 0)
      cout << "LM\n";
    else if (a[1] == 0 && c[1] == 0)
      cout << "LW\n";
    else if (b[1] == 0 && c[1] == 0)
      cout << "MW\n";
    return 0;
  }
  mx = -2e9;
  build(1, n / 2);
  build2(n / 2 + 1, n);
  if (mx != -2e9) {
    for (int i = 1; i <= n; i++) cout << s[i] << "\n";
  } else
    cout << "Impossible\n";
  return 0;
}
