#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using namespace std;
const int N = 26;
int n, x[N], y[N], z[N], pw[N];
map<pair<int, int>, pair<int, int> > mp;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  for (int i = (0); i <= (n - 1); ++i) cin >> x[i] >> y[i] >> z[i];
  pw[0] = 1;
  for (int i = (1); i <= (n); ++i) pw[i] = pw[i - 1] * 3;
  for (int mask = (0); mask <= (pw[n / 2] - 1); ++mask) {
    int x1 = 0, ___y1 = 0, z1 = 0;
    for (int i = (0); i <= (n / 2 - 1); ++i) {
      int b = (mask / pw[i]) % 3;
      if (b != 0) x1 += x[i];
      if (b != 1) ___y1 += y[i];
      if (b != 2) z1 += z[i];
    }
    if (mp.find({___y1 - x1, z1 - x1}) == mp.end() ||
        mp[{___y1 - x1, z1 - x1}].first < x1 + 1) {
      mp[{___y1 - x1, z1 - x1}] = {x1 + 1, mask};
    }
  }
  int ans1 = 0, ans2 = 0, mx = -1e9;
  for (int mask = (0); mask <= (pw[n - n / 2] - 1); ++mask) {
    int x1 = 0, ___y1 = 0, z1 = 0;
    for (int i = (0); i <= (n - n / 2 - 1); ++i) {
      int b = (mask / pw[i]) % 3;
      if (b != 0) x1 += x[i + n / 2];
      if (b != 1) ___y1 += y[i + n / 2];
      if (b != 2) z1 += z[i + n / 2];
    }
    if (mp.find({x1 - ___y1, x1 - z1}) != mp.end()) {
      auto tmp = mp[{x1 - ___y1, x1 - z1}];
      if (mx < tmp.first - 1 + x1) {
        mx = tmp.first - 1 + x1;
        ans1 = tmp.second;
        ans2 = mask;
      }
    }
  }
  if (mx == -1e9)
    cout << "Impossible";
  else {
    for (int i = (0); i <= (n / 2 - 1); ++i) {
      int b = (ans1 / pw[i]) % 3;
      if (b != 0) cout << 'L';
      if (b != 1) cout << 'M';
      if (b != 2) cout << 'W';
      cout << '\n';
    }
    for (int i = (0); i <= (n - n / 2 - 1); ++i) {
      int b = (ans2 / pw[i]) % 3;
      if (b != 0) cout << 'L';
      if (b != 1) cout << 'M';
      if (b != 2) cout << 'W';
      cout << '\n';
    }
  }
  return 0;
}
