#include <bits/stdc++.h>
using namespace std;
struct lmw {
  int a[3];
  lmw() { a[0] = a[1] = a[2] = 0; }
  lmw& operator+=(const lmw& l) {
    a[0] += l.a[0];
    a[1] += l.a[1];
    a[2] += l.a[2];
    return *this;
  }
  const bool equal() { return a[0] == a[1] && a[1] == a[2]; }
};
bool operator<(const lmw& left, const lmw& right) {
  int v1, v2;
  v1 = left.a[0] - left.a[1];
  v2 = right.a[0] - right.a[1];
  if (v1 < v2) return true;
  if (v1 > v2) return false;
  v1 = left.a[1] - left.a[2];
  v2 = right.a[1] - right.a[2];
  return v1 < v2;
}
bool operator<(const pair<lmw, int>& _left, const pair<lmw, int>& _right) {
  const lmw& left = _left.first;
  const lmw& right = _right.first;
  int v1, v2;
  v1 = left.a[0] - left.a[1];
  v2 = right.a[0] - right.a[1];
  if (v1 < v2) return true;
  if (v1 > v2) return false;
  v1 = left.a[1] - left.a[2];
  v2 = right.a[1] - right.a[2];
  if (v1 < v2) return true;
  if (v1 > v2) return false;
  return left.a[0] < right.a[0];
}
vector<lmw> a;
void gen(int s, int f, vector<pair<lmw, int> >& out) {
  int mm = 1;
  lmw sum;
  for (int i = s; i < f; i++) {
    mm *= 3;
    sum += a[i];
  }
  out.resize(mm);
  for (int m = 0; m < mm; m++) {
    int _m = m;
    lmw _sum(sum);
    for (int i = s; i < f; i++, _m /= 3) {
      int j = _m % 3;
      _sum.a[j] -= a[i].a[j];
    }
    out[m].first = _sum;
    out[m].second = m;
  }
}
void print_mask(int m, int n) {
  for (int i = 0; i < n; i++, m /= 3) {
    int _m = m % 3;
    if (_m == 0)
      cout << "MW" << endl;
    else if (_m == 1)
      cout << "LW" << endl;
    else
      cout << "LM" << endl;
  }
}
bool keq(const lmw& left, const lmw& right) {
  lmw t(left);
  t += right;
  return t.equal();
}
int main(int argc, const char* argv[]) {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    lmw x;
    cin >> x.a[0] >> x.a[1] >> x.a[2];
    a.push_back(x);
  }
  if (n <= 2) {
    vector<pair<lmw, int> > out;
    gen(0, n, out);
    int besti = -1;
    for (int i = 0; i < (int)out.size(); i++)
      if (out[i].first.equal()) {
        if (besti < 0 || out[i].first.a[0] > out[besti].first.a[0]) besti = i;
      }
    if (besti < 0)
      cout << "Impossible" << endl;
    else
      print_mask(out[besti].second, n);
  } else {
    vector<pair<lmw, int> > out1, out2;
    gen(0, n / 2, out1);
    gen(n / 2, n, out2);
    pair<int, int> best;
    int bestsum = -2000000000;
    sort(out2.begin(), out2.end());
    for (typeof(out1.end()) it = out1.begin(); it != out1.end(); ++it) {
      lmw target;
      target.a[0] = -it->first.a[0];
      target.a[1] = -it->first.a[1];
      target.a[2] = -it->first.a[2];
      int left = 0, right = out2.size();
      while (left + 1 < right) {
        int mid = (left + right) / 2;
        if (target < out2[mid].first)
          right = mid;
        else
          left = mid;
      }
      target = it->first;
      target += out2[left].first;
      if (target.a[0] > bestsum && target.equal()) {
        bestsum = target.a[0];
        best.first = it->second;
        best.second = out2[left].second;
      }
    }
    if (bestsum > -2000000000) {
      print_mask(best.first, n / 2);
      print_mask(best.second, n - n / 2);
    } else {
      cout << "Impossible" << endl;
    }
  }
  return 0;
}
