#include <bits/stdc++.h>
using namespace std;
constexpr int N = 30, inf = 3e8, M = 2e6 + 7;
int a[3][N];
int pw[100];
pair<pair<int, int>, int> v[M];
pair<pair<int, int>, int> tof[M];
int32_t main() {
  ios::sync_with_stdio(0);
  pw[0] = 1;
  for (int i = 1; i < 26; i++) pw[i] = pw[i - 1] * 3;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < 3; j++) cin >> a[j][i];
  for (int ii = 0; ii < pw[n / 2]; ii++) {
    int x = 0, y = 0, z = 0;
    for (int i = 0; i < n / 2; i++) {
      int o = ii / pw[i];
      x += a[0][i], y += a[1][i], z += a[2][i];
      if ((o % 3) == 0) x -= a[0][i];
      if ((o % 3) == 1) y -= a[1][i];
      if ((o % 3) == 2) z -= a[2][i];
    }
    pair<int, int> f = {x - y, x - z};
    v[ii] = make_pair(f, -x);
  }
  v[(int)pw[n / 2]] = make_pair(make_pair(inf, inf), inf);
  int ooo = pw[n / 2];
  sort(v, v + ooo);
  int ans = -1e9, ans1 = -1, ans2 = -1;
  pair<pair<int, int>, int> an;
  for (int ii = 0; ii < pw[n - n / 2]; ii++) {
    int x = 0, y = 0, z = 0;
    for (int i = n / 2; i < n; i++) {
      int o = ii / (pw[i - n / 2]);
      x += a[0][i], y += a[1][i], z += a[2][i];
      if (o % 3 == 0) x -= a[0][i];
      if (o % 3 == 1) y -= a[1][i];
      if (o % 3 == 2) z -= a[2][i];
    }
    pair<int, int> f = {-(x - y), -(x - z)};
    pair<pair<int, int>, int> pt = *upper_bound(v, v + ooo, make_pair(f, -inf));
    if (pt.first == f && ans < -pt.second + x) {
      ans = -pt.second + x, ans2 = ii, an = pt;
    }
  }
  for (int ii = 0; ii < pw[n / 2]; ii++) {
    int x = 0, y = 0, z = 0;
    for (int i = 0; i < n / 2; i++) {
      int o = ii / pw[i];
      x += a[0][i], y += a[1][i], z += a[2][i];
      if ((o % 3) == 0) x -= a[0][i];
      if ((o % 3) == 1) y -= a[1][i];
      if ((o % 3) == 2) z -= a[2][i];
    }
    pair<int, int> f = {x - y, x - z};
    if (make_pair(f, -x) == an) {
      ans1 = ii;
      break;
    }
  }
  if (ans == -1e9)
    cout << "Impossible\n";
  else {
    for (int i = 0; i < n / 2; i++) {
      int o = ans1 / pw[i];
      if (o % 3 == 0) cout << "MW\n";
      if (o % 3 == 1) cout << "LW\n";
      if (o % 3 == 2) cout << "LM\n";
    }
    for (int i = n / 2; i < n; i++) {
      int o = ans2 / pw[i - n / 2];
      if (o % 3 == 0) cout << "MW\n";
      if (o % 3 == 1) cout << "LW\n";
      if (o % 3 == 2) cout << "LM\n";
    }
  }
}
