#include <bits/stdc++.h>
using namespace std;
long long a[109], b[109], c[109];
long long p[109];
map<pair<long long, long long>, pair<long long, long long> > M;
int main() {
  long long n;
  cin >> n;
  p[0] = 1;
  for (long long i = 1; i <= 25; i++) p[i] = p[i - 1] * 3;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i] >> b[i] >> c[i];
  }
  long long x = n / 2, y = n - n / 2;
  vector<vector<long long> > A, B;
  A.push_back({0, 0, 0, 0});
  B.push_back({0, 0, 0, 0});
  for (long long i = 1; i <= x; i++) {
    long long d = A.size();
    for (long long j = 0; j < d; j++)
      A.push_back(
          {A[j][0] + a[i], A[j][1] + b[i], A[j][2], A[j][3] + p[i - 1]});
    for (long long j = 0; j < d; j++)
      A.push_back({A[j][0], A[j][1] + b[i], A[j][2] + c[i],
                   A[j][3] + p[i - 1] + p[i - 1]});
    for (long long j = 0; j < d; j++) A[j][0] += a[i], A[j][2] += c[i];
  }
  for (long long i = x + 1; i <= n; i++) {
    long long d = B.size();
    for (long long j = 0; j < d; j++)
      B.push_back(
          {B[j][0] + a[i], B[j][1] + b[i], B[j][2], B[j][3] + p[i - 1]});
    for (long long j = 0; j < d; j++)
      B.push_back({B[j][0], B[j][1] + b[i], B[j][2] + c[i],
                   B[j][3] + p[i - 1] + p[i - 1]});
    for (long long j = 0; j < d; j++) B[j][0] += a[i], B[j][2] += c[i];
  }
  for (auto x : A) {
    pair<long long, long long> U = {x[1] - x[0], x[2] - x[0]}, V = {x[0], x[3]};
    if (M.find(U) == M.end())
      M[U] = V;
    else
      M[U] = max(M[U], V);
  }
  long long mask = -1, ans = -2e9;
  for (auto x : B) {
    pair<long long, long long> U = {-x[1] + x[0], -x[2] + x[0]};
    if (M.find(U) == M.end()) continue;
    if (ans > x[0] + M[U].first) continue;
    ans = M[U].first + x[0];
    mask = M[U].second + x[3];
  }
  if (mask == -1) {
    cout << "Impossible" << endl;
    return 0;
  }
  for (long long i = 1; i <= n; i++) {
    if (mask % 3 == 1) cout << "LM" << endl;
    if (mask % 3 == 2) cout << "MW" << endl;
    if (mask % 3 == 0) cout << "LW" << endl;
    mask /= 3;
  }
}
