#include <bits/stdc++.h>
using namespace std;
int val[30][3];
int n;
string path;
map<pair<int, int>, pair<int, string> > m[2];
string mp[] = {"MW\n", "LW\n", "LM\n"};
map<pair<int, int>, pair<int, string> >::iterator iter, ater;
int ans = (int)-1e9;
string sp;
void dfs(int k, int h, int x, int p, int q, int r) {
  if (h == 0) {
    if (k == 0) {
      iter = m[1].find(make_pair(-p + q, -q + r));
      if (iter != m[1].end()) {
        if (ans < p + iter->second.first) {
          ans = p + iter->second.first;
          ater = iter;
          sp = path;
        }
      }
    } else {
      iter = m[k].find(make_pair(p - q, q - r));
      if (iter != m[k].end()) {
        if (iter->second.first < p) {
          iter->second.first = p;
          iter->second.second = path;
        }
      } else {
        m[k][make_pair(p - q, q - r)] = make_pair(p, path);
      }
    }
    return;
  }
  path += mp[0];
  dfs(k, h - 1, x + 1, p, q + val[x][1], r + val[x][2]);
  path.erase(path.size() - 3);
  path += mp[1];
  dfs(k, h - 1, x + 1, p + val[x][0], q, r + val[x][2]);
  path.erase(path.size() - 3);
  path += mp[2];
  dfs(k, h - 1, x + 1, p + val[x][0], q + val[x][1], r);
  path.erase(path.size() - 3);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < 3; ++j) {
      scanf("%d", &val[i][j]);
    }
  }
  if (n == 1) {
    for (int i = 0; i < 3; ++i) {
      int j = (i + 1) % 3;
      if (val[0][i] == val[0][j] && !val[0][i]) {
        cout << mp[(i + 2) % 3];
        return 0;
      }
    }
    printf("Impossible\n");
    return 0;
  }
  int h = n / 2;
  dfs(1, h, n - h, 0, 0, 0);
  dfs(0, n - h, 0, 0, 0, 0);
  if (ans > (int)-1e9) {
    cout << sp;
    cout << (ater->second.second);
  } else {
    printf("Impossible\n");
  }
  return 0;
}
