#include <bits/stdc++.h>
using namespace std;
map<pair<int, int>, pair<int, string> > mapp;
int start, endd, mx, n, arr[100][3];
string ans;
void go1(int ind, int suma, int sumb, int sumc, string res) {
  if (ind == endd) {
    auto it = make_pair(sumb - suma, sumc - sumb);
    if (mapp.count(it))
      mapp[it] = max(mapp[it], make_pair(suma, res));
    else
      mapp[it] = make_pair(suma, res);
    return;
  }
  go1(ind + 1, suma + arr[ind][0], sumb + arr[ind][1], sumc, res + "LM\n");
  go1(ind + 1, suma, sumb + arr[ind][1], sumc + arr[ind][2], res + "MW\n");
  go1(ind + 1, suma + arr[ind][0], sumb, sumc + arr[ind][2], res + "LW\n");
}
void go2(int ind, int suma, int sumb, int sumc, string res) {
  if (ind == endd) {
    auto it = make_pair(-sumb + suma, -sumc + sumb);
    if (mapp.count(it)) {
      int temp = suma + mapp[it].first;
      if (temp > mx) {
        mx = temp;
        ans = mapp[it].second + res;
      }
    }
    return;
  }
  go2(ind + 1, suma + arr[ind][0], sumb + arr[ind][1], sumc, res + "LM\n");
  go2(ind + 1, suma, sumb + arr[ind][1], sumc + arr[ind][2], res + "MW\n");
  go2(ind + 1, suma + arr[ind][0], sumb, sumc + arr[ind][2], res + "LW\n");
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i][0] >> arr[i][1] >> arr[i][2];
  start = 0;
  endd = n / 2;
  go1(start, 0, 0, 0, "");
  mx = INT_MIN;
  ans = "Impossible\n";
  start = endd;
  endd = n;
  go2(start, 0, 0, 0, "");
  cout << ans;
}
