#include <bits/stdc++.h>
using namespace std;
void Fast_Read_Out() {
  ios_base::sync_with_stdio(0);
  cin.tie(), cout.tie();
}
void Random() {
  unsigned int seed;
  asm("rdtsc" : "=A"(seed));
  srand(seed);
}
unsigned int Time() {
  unsigned int time = clock() / 1000.00;
  return time;
}
const int mod = (int)1e9 + 7;
int l[26], w[26], m[26], sum = -mod, n, maxi = -mod;
string kl;
map<pair<int, int>, pair<string, int> > lol;
void Rec(int l1, int m1, int w1, int pos, string path = "") {
  if (pos == n / 2) {
    if (!lol.count(make_pair(m1 - l1, m1 - w1)))
      lol[make_pair(m1 - l1, m1 - w1)] = make_pair(path, l1);
    else {
      auto kek = lol[make_pair(m1 - l1, m1 - w1)];
      if (kek.second < l1)
        lol[make_pair(m1 - l1, m1 - w1)] = make_pair(path, l1);
    }
    return;
  } else {
    Rec(l1 + l[pos], m1 + m[pos], w1, pos + 1, path + "LM");
    Rec(l1, m1 + m[pos], w1 + w[pos], pos + 1, path + "MW");
    Rec(l1 + l[pos], m1, w1 + w[pos], pos + 1, path + "LW");
  }
}
void Ans(int l2, int m2, int w2, int pos, string path = "") {
  if (pos == n) {
    if (!lol.count(make_pair(l2 - m2, w2 - m2)))
      return;
    else {
      auto kek = lol[make_pair(l2 - m2, w2 - m2)];
      if (maxi < kek.second + l2) {
        kl = kek.first + path;
        maxi = kek.second + l2;
      }
    }
  } else {
    Ans(l2 + l[pos], m2 + m[pos], w2, pos + 1, path + "LM");
    Ans(l2, m2 + m[pos], w2 + w[pos], pos + 1, path + "MW");
    Ans(l2 + l[pos], m2, w2 + w[pos], pos + 1, path + "LW");
  }
}
int main() {
  Fast_Read_Out();
  Random();
  cin >> n;
  for (int i = 0; i < n; i++) cin >> l[i] >> m[i] >> w[i];
  Rec(0, 0, 0, 0);
  Ans(0, 0, 0, n / 2);
  if ((int)(kl.size()) == 0) {
    cout << "Impossible" << endl;
    exit(0);
  }
  for (int i = 0; i < (int)(kl.size()); i += 2)
    cout << kl[i] << kl[i + 1] << "\n";
}
