#include <bits/stdc++.h>
using namespace std;
int main() {
  ios ::sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin >> N;
  vector<vector<int> > a(N, vector<int>(3));
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < 3; j++) {
      cin >> a[i][j];
    }
  }
  if (N == 1) {
    if (a[0][0] == 0 && 0 == a[0][1]) {
      cout << "LM" << endl;
    } else if (a[0][1] == 0 && 0 == a[0][2]) {
      cout << "MW" << endl;
    } else if (a[0][0] == 0 && 0 == a[0][2]) {
      cout << "LW" << endl;
    } else {
      cout << "Impossible" << endl;
    }
    return 0;
  }
  int k1 = N / 2;
  int k2 = N - k1;
  map<pair<int, int>, pair<int, int> > dp;
  for (int p = 0; p < pow(3, k1); p++) {
    int t = p;
    vector<int> curr(3, 0);
    for (int i = 0; i < k1; i++) {
      int index = t % 3;
      for (int j = 0; j < 3; j++) {
        if (index == j) {
          continue;
        }
        curr[j] += a[i][j];
      }
      t /= 3;
    }
    auto key = make_pair(curr[0] - curr[1], curr[1] - curr[2]);
    if (dp.find(key) == dp.end() || dp[key].first < curr[0]) {
      dp[key] = make_pair(curr[0], p);
    }
  }
  set<pair<int, pair<int, int> > > ans;
  for (int p = 0; p < pow(3, k2); p++) {
    int t = p;
    vector<int> curr(3, 0);
    for (int i = k1; i < k1 + k2; i++) {
      int index = t % 3;
      for (int j = 0; j < 3; j++) {
        if (index == j) {
          continue;
        }
        curr[j] += a[i][j];
      }
      t /= 3;
    }
    auto key = make_pair(curr[1] - curr[0], curr[2] - curr[1]);
    if (dp.find(key) != dp.end()) {
      ans.insert(
          make_pair(dp[key].first + curr[0], make_pair(dp[key].second, p)));
    }
  }
  if (ans.empty()) {
    cout << "Impossible" << endl;
  } else {
    auto au = *ans.rbegin();
    int p1 = au.second.first;
    int p2 = au.second.second;
    for (int i = 0; i < k1; i++) {
      if (p1 % 3 == 0) {
        cout << "MW" << endl;
      } else if (p1 % 3 == 1) {
        cout << "LW" << endl;
      } else {
        cout << "LM" << endl;
      }
      p1 /= 3;
    }
    for (int i = 0; i < k2; i++) {
      if (p2 % 3 == 0) {
        cout << "MW" << endl;
      } else if (p2 % 3 == 1) {
        cout << "LW" << endl;
      } else {
        cout << "LM" << endl;
      }
      p2 /= 3;
    }
  }
}
