#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
const double PI = acos(-1.0);
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int N = 26;
int l[N], m[N], w[N];
map<pair<int, int>, pair<int, pair<int, int>>> mp;
map<pair<int, int>, int> mp2;
void upd1(int &m1, int &m2, int &m3, int &s1, int &s2, int &s3) {
  pair<int, int> tmp = {s2 - s1, s3 - s1};
  if (!mp2.count(tmp)) {
    mp2[tmp] = s1;
    mp[tmp] = {m1, {m2, m3}};
  }
  if (mp2[tmp] < s1) {
    mp2[tmp] = s1;
    mp[tmp] = {m1, {m2, m3}};
  }
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> l[i] >> m[i] >> w[i];
  }
  if (n == 1) {
    int i = 0;
    if (l[i] == 0 && m[i] == 0) {
      cout << "LM\n";
      return 0;
    } else if (m[i] == 0 && w[i] == 0) {
      cout << "MW\n";
    } else if (l[i] == 0 && w[i] == 0) {
      cout << "LW\n";
    } else
      cout << "Impossible\n";
    return 0;
  }
  int left = n / 2;
  int right = n - left;
  for (int m1 = 0; m1 < (1 << left); m1++) {
    for (int s = m1; s >= 0; s = (s - 1) & m1) {
      int m2 = ((1 << left) - 1) ^ m1 ^ s;
      int m3 = ((1 << left) - 1) ^ s;
      int s1 = 0, s2 = 0, s3 = 0;
      for (int j = 0; j < left; j++) {
        if ((1 << j) & m1) s1 += l[j];
        if ((1 << j) & m2) s2 += m[j];
        if ((1 << j) & m3) s3 += w[j];
      }
      upd1(m1, m2, m3, s1, s2, s3);
      if (s == 0) break;
    }
  }
  left = n - left;
  int ma = -1e9;
  int ans1, ans2, ans3;
  for (int m1 = 0; m1 < (1 << left); m1++) {
    for (int s = m1; s >= 0; s = (s - 1) & m1) {
      int m2 = ((1 << left) - 1) ^ m1 ^ s;
      int m3 = ((1 << left) - 1) ^ s;
      int s1 = 0, s2 = 0, s3 = 0;
      for (int j = 0; j < left; j++) {
        if ((1 << j) & m1) s1 += l[n / 2 + j];
        if ((1 << j) & m2) s2 += m[n / 2 + j];
        if ((1 << j) & m3) s3 += w[n / 2 + j];
      }
      if (mp.count(make_pair(s1 - s2, s1 - s3))) {
        auto tmp = mp[make_pair(s1 - s2, s1 - s3)];
        int tans1 = (m1 << (n / 2)) | (tmp.first);
        int tans2 = (m2 << (n / 2)) | (tmp.second.first);
        int tans3 = (m3 << (n / 2)) | (tmp.second.second);
        if (mp2[make_pair(s1 - s2, s1 - s3)] + s1 > ma) {
          ma = mp2[make_pair(s1 - s2, s1 - s3)] + s1;
          ans1 = tans1;
          ans2 = tans2;
          ans3 = tans3;
        }
      }
      if (s == 0) break;
    }
  }
  if (ma == -1e9) {
    cout << "Impossible\n";
    return 0;
  }
  for (int j = 0; j < n; j++) {
    if (((ans1 & (1 << j)) > 0) && ((ans2 & (1 << j)) > 0)) {
      cout << "LM\n";
    } else if (((ans1 & (1 << j)) > 0) && ((ans3 & (1 << j)) > 0)) {
      cout << "LW\n";
    } else {
      cout << "MW\n";
    }
  }
}
