#include <bits/stdc++.h>
using namespace std;
void FastIO() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  cout.precision(15);
}
long long modpow(long long a, long long p, long long mod) {
  long long ret = 1;
  while (p) {
    if (p & 1) ret = (ret * a) % mod;
    a = (a * a) % mod;
    p /= 2;
  }
  return ret % mod;
}
long long power(long long a, long long p) {
  long long ret = 1;
  while (p) {
    if (p & 1) ret = (ret * a);
    a = (a * a);
    p /= 2;
  }
  return ret;
}
int vec[30];
int l[30], m[30], w[30];
map<pair<int, int>, int> mapit;
map<int, string> s;
map<int, int> fin;
int ans = INT_MIN, m1, m2;
int main() {
  FastIO();
  s[0] = "LM";
  s[1] = "MW";
  s[2] = "WL";
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> l[i] >> m[i] >> w[i];
  long long tot1 = power(3, n / 2);
  long long tot2 = power(3, n - n / 2);
  for (int i = 0; i < tot1; i++) {
    int t = i;
    for (int j = 0; j < n / 2; j++) {
      vec[j] = t % 3;
      t /= 3;
    }
    reverse(vec, vec + n / 2);
    int x = 0, y = 0, z = 0;
    for (int j = 0; j < n / 2; j++) {
      if (vec[j] == 0) {
        x += l[j];
        y += m[j];
      } else if (vec[j] == 1) {
        y += m[j];
        z += w[j];
      } else {
        z += w[j];
        x += l[j];
      }
    }
    mapit[make_pair(y - x, z - x)] = i + 1;
    fin[i] = x;
  }
  for (int i = 0; i < tot2; i++) {
    int t = i;
    for (int j = n / 2; j < n; j++) {
      vec[j - n / 2] = (t % 3);
      t /= 3;
    }
    reverse(vec, vec + n - n / 2);
    int x = 0, y = 0, z = 0;
    for (int j = n / 2; j < n; j++) {
      int k = j - n / 2;
      if (vec[k] == 0) {
        x += l[j];
        y += m[j];
      } else if (vec[k] == 1) {
        y += m[j];
        z += w[j];
      } else {
        z += w[j];
        x += l[j];
      }
    }
    y -= x;
    z -= x;
    int mask = mapit[make_pair(-y, -z)] - 1;
    if (mask == -1) continue;
    int f = fin[mask];
    if (f + x > ans) {
      ans = f + x;
      m1 = mask;
      m2 = i;
    }
  }
  if (ans == INT_MIN) {
    cout << "Impossible\n";
    return 0;
  }
  vector<int> vec;
  for (int j = 0; j < n / 2; j++) {
    vec.push_back(m1 % 3);
    m1 /= 3;
  }
  reverse(vec.begin(), vec.end());
  for (int j = 0; j < n / 2; j++) cout << s[vec[j]] << '\n';
  for (int j = n / 2; j < n; j++) {
    vec.push_back(m2 % 3);
    m2 /= 3;
  }
  reverse(vec.begin(), vec.end());
  for (int j = 0; j < n - n / 2; j++) cout << s[vec[j]] << '\n';
  return 0;
}
