#include <bits/stdc++.h>
using namespace std;
const int maxN = 50;
int n;
map<pair<int, int>, pair<int, int>> mp;
int v1[maxN][3];
int v2[maxN][3];
int a[maxN][3];
void precalc(int i, int sz, int mask = 0, int sa = 0, int sb = 0, int sc = 0) {
  int d1 = sb - sa;
  int d2 = sc - sb;
  if (i == sz && (mp.count({d1, d2}) == 0 || mp[{d1, d2}].second < sa))
    mp[{d1, d2}] = {mask, sa};
  if (i < sz) {
    precalc(i + 1, sz, mask * 3 + 0, sa + v1[i][0], sb + v1[i][1], sc);
    precalc(i + 1, sz, mask * 3 + 1, sa + v1[i][0], sb, sc + v1[i][2]);
    precalc(i + 1, sz, mask * 3 + 2, sa, sb + v1[i][1], sc + v1[i][2]);
  }
}
void update(int& a, int& b, int& c, int na, int nb, int nc) {
  if (a < na) {
    a = na;
    b = nb;
    c = nc;
  }
}
vector<int> getAns(int i, int sz, int mask = 0, int s1 = 0, int s2 = 0,
                   int s3 = 0) {
  int d1 = s1 - s2;
  int d2 = s2 - s3;
  int ansNum = -1e9, ansMask1 = 0, ansMask2 = 0;
  if (i == sz && mp.count({d1, d2})) {
    ansNum = s1 + mp[{d1, d2}].second;
    ansMask1 = mp[{d1, d2}].first;
    ansMask2 = mask;
  }
  if (i < sz) {
    auto ans1 =
        getAns(i + 1, sz, mask * 3 + 0, s1 + v2[i][0], s2 + v2[i][1], s3);
    update(ansNum, ansMask1, ansMask2, ans1[0], ans1[1], ans1[2]);
    auto ans2 =
        getAns(i + 1, sz, mask * 3 + 1, s1 + v2[i][0], s2, s3 + v2[i][2]);
    update(ansNum, ansMask1, ansMask2, ans2[0], ans2[1], ans2[2]);
    auto ans3 =
        getAns(i + 1, sz, mask * 3 + 2, s1, s2 + v2[i][1], s3 + v2[i][2]);
    update(ansNum, ansMask1, ansMask2, ans3[0], ans3[1], ans3[2]);
  }
  return {ansNum, ansMask1, ansMask2};
}
unordered_map<int, string> pattern;
vector<string> getMask(int mask, int sz) {
  vector<string> ans;
  for (int i = 0; i < sz; ++i) {
    int x = mask % 3;
    ans.push_back(pattern[x]);
    mask /= 3;
  }
  reverse(ans.begin(), ans.end());
  return ans;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  pattern[0] = "LM";
  pattern[1] = "LW";
  pattern[2] = "MW";
  cin >> n;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < 3; ++j) cin >> a[i][j];
  }
  for (int i = 0; i < (n + 1) / 2; ++i) {
    for (int j = 0; j < 3; ++j) v1[i][j] = a[i][j];
  }
  for (int i = (n + 1) / 2; i < n; ++i) {
    for (int j = 0; j < 3; ++j) v2[i - (n + 1) / 2][j] = a[i][j];
  }
  precalc(0, (n + 1) / 2);
  auto v = getAns(0, n - (n + 1) / 2);
  if (v[0] < -7e8)
    cout << "Impossible\n";
  else {
    auto ans1 = getMask(v[1], (n + 1) / 2);
    auto ans2 = getMask(v[2], n - (n + 1) / 2);
    for (auto i : ans1) cout << i << "\n";
    for (auto i : ans2) cout << i << "\n";
    cout << "\n";
  }
  return 0;
}
