#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fll;
int main() {
  if (!false) ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  long long ls = 0, ms = 0, ws = 0;
  vector<tuple<long long, long long, long long>> v(n);
  for (auto& [l, m, w] : v) {
    cin >> l >> m >> w;
    ls += l;
    ms += m;
    ws += w;
  }
  vector<long long> p3(n + 1);
  long long p = 1;
  for (int i = 0; i <= n; i++) p3[i] = p, p *= 3;
  pair<long long, long long> ans(-LINF, 0);
  int lsz = (n + 1) / 2, rsz = n - lsz;
  map<pair<long long, long long>, pair<long long, long long>> mp;
  if (rsz == 0)
    mp[{0, 0}] = {0, 0};
  else {
    tuple<long long, long long, long long> tsum(0, 0, 0);
    long long sum = 0;
    for (int i = lsz; i < n; i++) {
      auto [l, m, w] = v[i];
      auto& [tl, tm, tw] = tsum;
      tl += l, tm += m, tw += w;
      sum += l + m + w;
    }
    for (long long mask = 0; mask < p3[rsz]; mask++) {
      tuple<long long, long long, long long> tcur = tsum;
      long long sumcur = sum, maskcur = mask;
      auto& [tcl, tcm, tcw] = tcur;
      for (int i = 0; i < rsz; i++) {
        auto [l, m, w] = v[i + lsz];
        if (maskcur % 3 == 0) {
          tcl -= l;
          sumcur -= l;
        }
        if (maskcur % 3 == 1) {
          tcm -= m;
          sumcur -= m;
        }
        if (maskcur % 3 == 2) {
          tcw -= w;
          sumcur -= w;
        }
        maskcur /= 3;
      }
      pair<long long, long long> curdif = {tcm - tcl, tcw - tcm};
      if (!mp.count(curdif))
        mp[curdif] = {sumcur, mask};
      else
        mp[curdif] = max(mp[curdif], make_pair(sumcur, mask));
    }
  }
  tuple<long long, long long, long long> tsum(0, 0, 0);
  long long sum = 0;
  for (int i = 0; i < lsz; i++) {
    auto [l, m, w] = v[i];
    auto& [tl, tm, tw] = tsum;
    tl += l, tm += m, tw += w;
    sum += l + m + w;
  }
  for (long long mask = 0; mask < p3[lsz]; mask++) {
    tuple<long long, long long, long long> tcur = tsum;
    long long sumcur = sum, maskcur = mask;
    auto& [tcl, tcm, tcw] = tcur;
    for (int i = 0; i < lsz; i++) {
      auto [l, m, w] = v[i];
      if (maskcur % 3 == 0) {
        tcl -= l;
        sumcur -= l;
      }
      if (maskcur % 3 == 1) {
        tcm -= m;
        sumcur -= m;
      }
      if (maskcur % 3 == 2) {
        tcw -= w;
        sumcur -= w;
      }
      maskcur /= 3;
    }
    pair<long long, long long> needdif = {tcl - tcm, tcm - tcw};
    if (mp.count(needdif)) {
      auto [nsum, nmask] = mp[needdif];
      pair<long long, long long> win(nsum + sumcur, mask + p3[lsz] * nmask);
      ans = max(ans, win);
    }
  }
  if (ans.first == -LINF) {
    cout << "Impossible" << '\n';
    return 0;
  }
  long long mask = ans.second;
  for (int i = 0; i < n; i++) {
    if (mask % 3 == 0) cout << "MW" << '\n';
    if (mask % 3 == 1) cout << "LW" << '\n';
    if (mask % 3 == 2) cout << "LM" << '\n';
    mask /= 3;
  }
  return 0;
}
