#include <bits/stdc++.h>
using namespace std;
const long long N = 30;
long long a[N], flag0 = -3e15, flag1, flag2, flag3, n, b[N][3][2], c[N][3],
                flag4, flag5;
map<pair<long long, long long>, long long> M;
inline void dfs1(long long p, long long sum0, long long sum1, long long zzz) {
  if (p == (n + 1) / 2 + 1) {
    if (M.count(make_pair(sum0, sum1)))
      M[make_pair(sum0, sum1)] = max(M[make_pair(sum0, sum1)], zzz);
    else
      M[make_pair(sum0, sum1)] = zzz;
    return;
  }
  for (long long i = 0; i < 3; i++) {
    dfs1(p + 1, sum0 + b[p][i][0], sum1 + b[p][i][1], zzz + (i ? c[p][0] : 0));
  }
}
inline void dfs2(long long p, long long sum0, long long sum1, long long zzz) {
  if (p == n + 1) {
    if (M.count(make_pair(-sum0, -sum1)) &&
        zzz + M[make_pair(-sum0, -sum1)] > flag0) {
      flag0 = zzz + M[make_pair(-sum0, -sum1)];
      flag1 = sum0;
      flag2 = sum1;
      flag3 = 1;
      flag4 = M[make_pair(-sum0, -sum1)];
      flag5 = zzz;
      return;
    }
    return;
  }
  for (long long i = 0; i < 3; i++) {
    dfs2(p + 1, sum0 + b[p][i][0], sum1 + b[p][i][1], zzz + (i ? c[p][0] : 0));
  }
}
inline void dfs3(long long p, long long sum0, long long sum1, long long zzz) {
  if (flag3) return;
  if (p == (n + 1) / 2 + 1) {
    if (flag1 == -sum0 && flag2 == -sum1 && zzz == flag4) {
      for (long long i = 1; i <= (n + 1) / 2; i++) {
        if (a[i] == 0)
          puts("MW");
        else if (a[i] == 1)
          puts("LW");
        else
          puts("LM");
      }
      flag3 = 1;
    }
    return;
  }
  for (long long i = 0; i < 3; i++) {
    a[p] = i;
    dfs3(p + 1, sum0 + b[p][i][0], sum1 + b[p][i][1], zzz + (i ? c[p][0] : 0));
  }
}
inline void dfs4(long long p, long long sum0, long long sum1, long long zzz) {
  if (flag3) return;
  if (p == n + 1) {
    if (flag1 == sum0 && flag2 == sum1 && zzz == flag5) {
      for (long long i = (n + 1) / 2 + 1; i <= n; i++) {
        if (a[i] == 0)
          puts("MW");
        else if (a[i] == 1)
          puts("LW");
        else
          puts("LM");
      }
      flag3 = 1;
    }
    return;
  }
  for (long long i = 0; i < 3; i++) {
    a[p] = i;
    dfs4(p + 1, sum0 + b[p][i][0], sum1 + b[p][i][1], zzz + (i ? c[p][0] : 0));
  }
}
int main() {
  cin >> n;
  for (long long i = 1; i <= n; i++)
    for (long long j = 0; j < 3; j++) cin >> c[i][j];
  for (long long i = 1; i <= n; i++) {
    for (long long j = 0; j <= 3; j++) {
      for (long long k = 0; k < 2; k++) {
        b[i][j][k] = (k + 1 != j ? c[i][k + 1] : 0) - (k != j ? c[i][k] : 0);
      }
    }
  }
  dfs1(1, 0, 0, 0);
  dfs2((n + 1) / 2 + 1, 0, 0, 0);
  if (!flag3) {
    puts("Impossible");
    return 0;
  } else {
    flag3 = 0;
    dfs3(1, 0, 0, 0);
    flag3 = 0;
    dfs4((n + 1) / 2 + 1, 0, 0, 0);
  }
}
