#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
void ma(long long &a, const long long &b) { a = max(a, b); }
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long N;
  cin >> N;
  vector<vector<long long> > A(N, vector<long long>(3));
  long long res = 0;
  for (long long i = 0; i < N; i++) {
    for (long long j = 0; j < 3; j++) {
      cin >> A[i][j];
    }
  }
  long long K = N / 2;
  long long p3[20];
  p3[0] = 1;
  for (long long i = 1; i < 20; i++) {
    p3[i] = p3[i - 1] * 3;
  }
  long long d;
  long long X[3];
  map<pair<long long, long long>, long long> mp;
  long long m[3][2] = {{0, 1}, {0, 2}, {1, 2}};
  pair<long long, long long> p;
  for (long long i = 0; i < p3[K]; i++) {
    long long t = i;
    X[0] = X[1] = X[2] = 0;
    for (long long j = 0; j < K; j++) {
      d = t % 3;
      X[m[d][0]] += A[j][m[d][0]];
      X[m[d][1]] += A[j][m[d][1]];
      t /= 3;
    }
    p = make_pair(X[1] - X[0], X[2] - X[0]);
    if (mp.count(p) == 1) {
      ma(mp[p], X[0]);
    } else {
      mp[p] = X[0];
    }
  }
  long long K2 = N - K;
  long long res1[3];
  long long res2[3];
  long long INF = (long long)1 << 60;
  long long mx = -INF;
  for (long long i = 0; i < p3[K2]; i++) {
    long long t = i;
    X[0] = X[1] = X[2] = 0;
    for (long long j = 0; j < K2; j++) {
      d = t % 3;
      X[m[d][0]] += A[j + K][m[d][0]];
      X[m[d][1]] += A[j + K][m[d][1]];
      t /= 3;
    }
    p = make_pair(-(X[1] - X[0]), -(X[2] - X[0]));
    auto mm = mp.find(p);
    if (mm != mp.end()) {
      if ((*mm).second + X[0] > mx) {
        mx = (*mm).second + X[0];
        res1[0] = (*mm).second;
        res1[1] = (*mm).second + p.first;
        res1[2] = (*mm).second + p.second;
        res2[0] = X[0];
        res2[1] = X[1];
        res2[2] = X[2];
      }
    }
  }
  if (mx == -INF) {
    cout << "Impossible" << endl;
    return 0;
  }
  long long i1 = 0;
  for (long long i = 0; i < p3[K]; i++) {
    long long t = i;
    X[0] = X[1] = X[2] = 0;
    for (long long j = 0; j < K; j++) {
      d = t % 3;
      X[m[d][0]] += A[j][m[d][0]];
      X[m[d][1]] += A[j][m[d][1]];
      t /= 3;
    }
    if (X[0] == res1[0] && X[1] == res1[1] && X[2] == res1[2]) {
      i1 = i;
      break;
    }
  }
  long long i2 = 0;
  for (long long i = 0; i < p3[K2]; i++) {
    long long t = i;
    X[0] = X[1] = X[2] = 0;
    for (long long j = 0; j < K2; j++) {
      d = t % 3;
      X[m[d][0]] += A[j + K][m[d][0]];
      X[m[d][1]] += A[j + K][m[d][1]];
      t /= 3;
    }
    if (X[0] == res2[0] && X[1] == res2[1] && X[2] == res2[2]) {
      i2 = i;
      break;
    }
  }
  string R = "LMW";
  for (long long j = 0; j < K; j++) {
    d = i1 % 3;
    cout << R[m[d][0]] << R[m[d][1]] << endl;
    i1 /= 3;
  }
  for (long long j = 0; j < K2; j++) {
    d = i2 % 3;
    cout << R[m[d][0]] << R[m[d][1]] << endl;
    i2 /= 3;
  }
}
