#include <bits/stdc++.h>
using namespace std;
template <typename T>
void DBG(const char* name, T&& H) {
  cerr << name << " = " << H << ')' << '\n';
}
template <typename T, typename... Args>
void DBG(const char* names, T&& H, Args&&... args) {
  const char* NEXT = strchr(names + 1, ',');
  cerr.write(names, NEXT - names) << " = " << H << " |";
  DBG(NEXT + 1, args...);
}
using ll = long long;
using ld = long double;
const long long mod = 1e9 + 7;
const long double PI = acos(-1.0);
const long long INF = 1e18;
const int maxN = 1e5 + 1;
void Solve() {
  int N;
  cin >> N;
  vector<vector<int>> attitude(N, vector<int>(3, 0));
  for (int i = 0; i < N; i++) {
    cin >> attitude[i][0] >> attitude[i][1] >> attitude[i][2];
  }
  int F = (N / 2), S = (N + 1) / 2;
  map<pair<int, int>, pair<int, pair<int, int>>> firstHalf, secondHalf;
  for (int i = 0; i < (1 << F); i++) {
    int A = 0, B = 0, C = 0;
    vector<int> one;
    for (int j = 0; j < F; j++) {
      if (i & (1 << j)) {
        A += attitude[j][0];
        one.push_back(j);
      } else {
        B += attitude[j][1];
        C += attitude[j][2];
      }
    }
    int semiMask = one.size();
    for (int j = 0; j < (1 << semiMask); j++) {
      int BB = 0, CC = 0;
      int curMask = 0;
      for (int k = 0; k < semiMask; k++) {
        if (j & (1 << k)) {
          BB += attitude[one[k]][1];
          curMask |= (1 << one[k]);
        } else
          CC += attitude[one[k]][2];
      }
      int mini = A;
      pair<int, int> key = {B + BB - A, C + CC - A};
      if (firstHalf.count(key)) {
        if (mini > firstHalf[key].first) {
          firstHalf[key] = {mini, {i, curMask}};
        }
      } else {
        firstHalf[key] = {mini, {i, curMask}};
      }
    }
    if (one.size() == 0) {
      int mini = A;
      pair<int, int> key = {B - A, C - A};
      if (firstHalf.count(key)) {
        if (mini > firstHalf[key].first) {
          firstHalf[key] = {mini, {i, 0}};
        }
      } else {
        firstHalf[key] = {mini, {i, 0}};
      }
    }
  }
  for (int i = 0; i < (1 << S); i++) {
    int A = 0, B = 0, C = 0;
    vector<int> one;
    for (int j = 0; j < S; j++) {
      if (i & (1 << j)) {
        A += attitude[j + F][0];
        one.push_back(j + F);
      } else {
        B += attitude[j + F][1];
        C += attitude[j + F][2];
      }
    }
    int semiMask = one.size();
    for (int j = 0; j < (1 << semiMask); j++) {
      int BB = 0, CC = 0;
      int curMask = 0;
      for (int k = 0; k < semiMask; k++) {
        if (j & (1 << k)) {
          BB += attitude[one[k]][1];
          curMask |= (1 << (one[k] - F));
        } else
          CC += attitude[one[k]][2];
      }
      int mini = A;
      pair<int, int> key = {B + BB - A, C + CC - A};
      if (secondHalf.count(key)) {
        if (mini > secondHalf[key].first) {
          secondHalf[key] = {mini, {i, curMask}};
        }
      } else {
        secondHalf[key] = {mini, {i, curMask}};
      }
    }
    if (one.size() == 0) {
      int mini = A;
      pair<int, int> key = {B - mini, C - mini};
      if (secondHalf.count(key)) {
        if (mini > secondHalf[key].first) {
          secondHalf[key] = {mini, {i, 0}};
        }
      } else {
        secondHalf[key] = {mini, {i, 0}};
      }
    }
  }
  bool pos = false;
  int ans = -2e9;
  vector<int> masks;
  for (auto i : firstHalf) {
    pair<int, int> other = {-i.first.first, -i.first.second};
    if (secondHalf.count(other)) {
      pair<int, pair<int, int>> lock = secondHalf[other];
      int res = i.second.first + lock.first;
      if (res > ans) {
        pos = true;
        ans = res;
        masks = {i.second.second.first, i.second.second.second,
                 lock.second.first, lock.second.second};
      }
    }
  }
  if (pos) {
    for (int i = 0; i < F; i++) {
      if (masks[0] & (1 << i)) {
        if (masks[1] & (1 << i))
          cout << "LM\n";
        else
          cout << "LW\n";
      } else {
        cout << "MW\n";
      }
    }
    for (int i = 0; i < S; i++) {
      if (masks[2] & (1 << i)) {
        if (masks[3] & (1 << i))
          cout << "LM\n";
        else
          cout << "LW\n";
      } else {
        cout << "MW\n";
      }
    }
  } else {
    cout << "Impossible\n";
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int tt = 1;
  while (tt--) {
    Solve();
  }
  return 0;
}
