#include <bits/stdc++.h>
using namespace std;
int n;
int a[26][4];
int sz_1, sz_2;
vector<string> Z;
map<pair<int, pair<int, int>>, int> mx_1;
map<pair<int, pair<int, int>>, vector<string>> s_1;
void dfs1(int pos, int val_1, int val_2, int val_3) {
  if (pos > sz_1) {
    pair<int, pair<int, int>> cur = pair<int, pair<int, int>>(
        val_2 - val_1, pair<int, int>(val_3 - val_1, val_3 - val_2));
    if (!mx_1.count(cur) || val_1 > mx_1[cur]) {
      mx_1[cur] = val_1;
      s_1[cur] = Z;
    }
    return;
  }
  Z.push_back("LM");
  dfs1(pos + 1, val_1 + a[pos][1], val_2 + a[pos][2], val_3);
  Z.pop_back();
  Z.push_back("LW");
  dfs1(pos + 1, val_1 + a[pos][1], val_2, val_3 + a[pos][3]);
  Z.pop_back();
  Z.push_back("MW");
  dfs1(pos + 1, val_1, val_2 + a[pos][2], val_3 + a[pos][3]);
  Z.pop_back();
}
int mx_ans = -2e9;
vector<string> ans;
void dfs2(int pos, int val_1, int val_2, int val_3) {
  if (pos > sz_2) {
    pair<int, pair<int, int>> cur = pair<int, pair<int, int>>(
        val_1 - val_2, pair<int, int>(val_1 - val_3, val_2 - val_3));
    if (mx_1.count(cur) && mx_1[cur] + val_1 > mx_ans) {
      mx_ans = mx_1[cur] + val_1;
      ans.clear();
      for (int i = 0; i < s_1[cur].size(); i++) ans.push_back(s_1[cur][i]);
      for (int i = 0; i < Z.size(); i++) ans.push_back(Z[i]);
    }
    return;
  }
  Z.push_back("LM");
  dfs2(pos + 1, val_1 + a[pos + sz_1][1], val_2 + a[pos + sz_1][2], val_3);
  Z.pop_back();
  Z.push_back("LW");
  dfs2(pos + 1, val_1 + a[pos + sz_1][1], val_2, val_3 + a[pos + sz_1][3]);
  Z.pop_back();
  Z.push_back("MW");
  dfs2(pos + 1, val_1, val_2 + a[pos + sz_1][2], val_3 + a[pos + sz_1][3]);
  Z.pop_back();
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= 3; j++) cin >> a[i][j];
  sz_1 = n / 2, sz_2 = n - n / 2;
  dfs1(1, 0, 0, 0);
  dfs2(1, 0, 0, 0);
  if (mx_ans == -2e9) {
    cout << "Impossible";
    return 0;
  }
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << '\n';
}
