#include <bits/stdc++.h>
using namespace std;
const long double pi = 2 * acos(0.0);
const long long prime = 31;
;
const long long inf = 1e18;
const long long mod = 1e18;
const long long maxn = 2e5 + 11;
const long long dx[8] = {0, 1, 0, -1, 1, 1, -1, -1};
const long long dy[8] = {1, 0, -1, 0, 1, -1, 1, -1};
long long n, a[3][maxn], sum[3], m[2], cnt = -inf, qq, ww;
bool id;
vector<pair<pair<long long, long long>, pair<long long, long long> > > q[2];
vector<string> ans;
map<pair<long long, long long>, long long> u;
inline void rec(long long v) {
  if (v > m[id]) {
    q[id].push_back({{sum[0], sum[1]}, {sum[2], q[id].size()}});
    return;
  }
  for (int i = 0; i < 3; ++i) {
    for (int j = 0; j < 3; ++j) {
      if (i != j) sum[j] += a[j][v];
    }
    rec(v + 1);
    for (int j = 0; j < 3; ++j) {
      if (i != j) sum[j] -= a[j][v];
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j < 3; ++j) {
      cin >> a[j][i];
    }
  }
  m[0] = n / 2;
  m[1] = n;
  id = 0;
  rec(1);
  id = 1;
  rec(n / 2 + 1);
  sort(q[0].begin(), q[0].end());
  for (long long i = 0, a, b, c; i < q[0].size(); ++i) {
    a = q[0][i].first.first;
    b = q[0][i].first.second;
    c = q[0][i].second.first;
    u[{a - b, a - c}] = i + 1;
  }
  for (long long i = 0, a, b, c, j; i < q[1].size(); ++i) {
    a = q[1][i].first.first;
    b = q[1][i].first.second;
    c = q[1][i].second.first;
    j = u[{b - a, c - a}];
    if (j != 0) {
      if (cnt < q[0][j - 1].first.first + a) {
        cnt = q[0][j - 1].first.first + a;
        qq = q[0][j - 1].second.second;
        ww = q[1][i].second.second;
      }
    }
  }
  if (cnt == -inf) {
    cout << "Impossible";
    return 0;
  }
  for (int i = 1; i <= n / 2; ++i) {
    if (qq % 3 == 0)
      ans.push_back("MW");
    else if (qq % 3 == 1)
      ans.push_back("LW");
    else
      ans.push_back("LM");
    qq /= 3;
  }
  reverse(ans.begin(), ans.end());
  for (string x : ans) {
    cout << x << endl;
  }
  ans.clear();
  for (int i = n / 2 + 1; i <= n; ++i) {
    if (ww % 3 == 0)
      ans.push_back("MW");
    else if (ww % 3 == 1)
      ans.push_back("LW");
    else
      ans.push_back("LM");
    ww /= 3;
  }
  reverse(ans.begin(), ans.end());
  for (string x : ans) {
    cout << x << endl;
  }
  ans.clear();
  return 0;
}
