#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const int MOD = 1000000007;
const double EPS = 1e-9;
int main() {
  cin.tie(0);
  cin.sync_with_stdio(0);
  int n;
  cin >> n;
  vector<tuple<int, int, int>> g(n);
  for (int i = 0; i < n; ++i) {
    int x, y, z;
    cin >> x >> y >> z;
    g[i] = tie(x, y, z);
  }
  map<pair<int, int>, pair<int, int>> m;
  int a = 0, b = 0, c = 0;
  for (int i = 0; i < n / 2; ++i) {
    int x, y, z;
    tie(x, y, z) = g[i];
    a += x;
    b += y;
    c += z;
  }
  int h = n / 2, up = 1;
  for (int i = 0; i < h; ++i) up *= 3;
  for (int mask = 0; mask < up; ++mask) {
    int da = a, db = b, dc = c;
    for (int i = 0, p = 1; i < h; ++i, p *= 3) {
      int k = mask / p % 3;
      if (k == 0) da -= get<0>(g[i]);
      if (k == 1) db -= get<1>(g[i]);
      if (k == 2) dc -= get<2>(g[i]);
    }
    if (m.find(make_pair(db - da, dc - db)) == m.end() ||
        m[make_pair(db - da, dc - db)].first < da) {
      m[make_pair(db - da, dc - da)] = {da, mask};
      0;
    }
  }
  h = n - h;
  up = (h != n - h ? up * 3 : up);
  int ans = -1000000000, m1, m2;
  a = 0, b = 0, c = 0;
  for (int i = n / 2; i < n; ++i) {
    a += get<0>(g[i]);
    b += get<1>(g[i]);
    c += get<2>(g[i]);
  }
  for (int mask = 0; mask < up; ++mask) {
    int da = a, db = b, dc = c;
    for (int i = 0, p = 1; i < h; ++i, p *= 3) {
      int k = mask / p % 3;
      if (k == 0) da -= get<0>(g[i + n - h]);
      if (k == 1) db -= get<1>(g[i + n - h]);
      if (k == 2) dc -= get<2>(g[i + n - h]);
    }
    if (m.find(make_pair(da - db, da - dc)) != m.end()) {
      auto it = m[make_pair(da - db, da - dc)];
      if (it.first + da > ans) {
        ans = it.first + da;
        m1 = it.second;
        m2 = mask;
      }
    }
  }
  0;
  if (ans == -1000000000) {
    cout << "Impossible\n";
    return 0;
  }
  for (int i = 0, p = 1; i < n - h; ++i, p *= 3) {
    int k = m1 / p % 3;
    if (k == 0) cout << "MW\n";
    if (k == 1) cout << "LW\n";
    if (k == 2) cout << "LM\n";
  }
  for (int i = 0, p = 1; i < h; ++i, p *= 3) {
    int k = m2 / p % 3;
    if (k == 0) cout << "MW\n";
    if (k == 1) cout << "LW\n";
    if (k == 2) cout << "LM\n";
  }
  return 0;
}
