#include <bits/stdc++.h>
using namespace std;
const int maxn = 25;
const int maxhfsize = 1600000;
struct Result {
  int d[2];
  int mask;
};
inline bool operator<(const Result& a, const Result& b) {
  return a.d[0] == b.d[0] ? a.d[1] < b.d[1] : a.d[0] < b.d[0];
}
inline bool operator==(const Result& a, const Result& b) {
  return a.d[0] == b.d[0] && a.d[1] == b.d[1];
}
int deltas[maxn][3];
int firstSize, secondSize;
Result firstHalf[maxhfsize], secondHalf[maxhfsize];
void makeHalf(Result* out, int& sz, int begin, int end) {
  int k = end - begin;
  int maxMask = 1;
  for (int i = 0; i < k; ++i) maxMask *= 3;
  sz = 0;
  for (int mask = 0; mask < maxMask; ++mask) {
    Result& here = out[sz++];
    here.mask = mask;
    int t = mask;
    for (int i = begin; i < end; ++i) {
      int bit = t % 3;
      t /= 3;
      if (bit != 0) {
        here.d[0] -= deltas[i][0];
        here.d[1] -= deltas[i][0];
      }
      if (bit != 1) here.d[0] += deltas[i][1];
      if (bit != 2) here.d[1] += deltas[i][2];
    }
  }
  sort(out, out + sz);
  sz = unique(out, out + sz) - out;
}
int n;
int score(int begin, int end, int mask) {
  int ret = 0;
  for (int i = begin; i < end; ++i) {
    int bit = mask % 3;
    mask /= 3;
    if (bit) ret += deltas[i][0];
  }
  return ret;
}
void out(int begin, int end, int mask) {
  int sum[3] = {0, 0, 0};
  for (int i = begin; i < end; ++i) {
    int bit = mask % 3;
    mask /= 3;
    for (int j = 0; j < 3; ++j)
      if (j != bit) {
        sum[j] += deltas[i][j];
        cout << "LMW"[j];
      }
    cout << '\n';
  }
  42;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < 3; ++j) cin >> deltas[i][j];
  int pivot = n / 2;
  makeHalf(firstHalf, firstSize, 0, pivot);
  makeHalf(secondHalf, secondSize, pivot, n);
  int notMuch = -100000000;
  int ansF = -1, ansS = -1, ans = notMuch;
  for (int i = 0; i < secondSize; ++i) {
    Result a = secondHalf[i];
    Result need;
    need.d[0] = -a.d[0];
    need.d[1] = -a.d[1];
    int fst = -1;
    if (pivot != 0 || need.d[0] || need.d[1]) {
      auto it = lower_bound(firstHalf, firstHalf + firstSize, need);
      if (it == firstHalf + firstSize || !(*it == need)) continue;
      fst = it->mask;
    }
    int here = score(0, pivot, fst) + score(pivot, n, a.mask);
    if (here > ans) {
      ans = here;
      ansF = fst;
      ansS = a.mask;
    }
  }
  if (ans == notMuch)
    cout << "Impossible\n";
  else {
    out(0, pivot, ansF);
    out(pivot, n, ansS);
  }
  42;
  return 0;
}
