#include <bits/stdc++.h>
using namespace std;
int cost[26][3];
int poss[3][3] = {{0, 1, 1}, {1, 0, 1}, {1, 1, 0}};
set<pair<int, int> > s2;
vector<pair<pair<int, int>, int> > s1;
map<pair<int, int>, int> m2;
map<pair<int, int>, int> mx2;
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 3; j++) {
      cin >> cost[i][j];
    }
  }
  if (n == 1) {
    bool ok = false;
    int ans = 0;
    int mx = -2000000000;
    for (int i = 0; i < 3; i++) {
      int l = poss[i][0] * cost[0][0];
      int m = poss[i][1] * cost[0][1];
      int w = poss[i][2] * cost[0][2];
      if (l == m and m == w) {
        ok = true;
        if (l > mx) {
          mx = l;
          ans = i;
        }
      }
    }
    if (ok) {
      if (poss[ans][0]) cout << "L";
      if (poss[ans][1]) cout << "M";
      if (poss[ans][2]) cout << "W";
      cout << "\n";
    } else {
      cout << "Impossible"
           << "\n";
    }
    exit(0);
  }
  int sz1 = n / 2;
  int sz2 = n / 2;
  sz1 += n & 1;
  int pos1 = 1;
  for (int i = 0; i < sz1; i++) {
    pos1 *= 3;
  }
  for (int i = 0; i < pos1; i++) {
    int cur = i;
    int l = 0, m = 0, w = 0;
    for (int j = 0; j < sz1; j++) {
      int aux = cur % 3;
      l += poss[aux][0] * cost[j][0];
      m += poss[aux][1] * cost[j][1];
      w += poss[aux][2] * cost[j][2];
      cur /= 3;
    }
    s1.push_back(make_pair(make_pair(m - l, m - w), i));
  }
  int pos2 = 1;
  for (int i = 0; i < sz2; i++) {
    pos2 *= 3;
  }
  for (int i = 0; i < pos2; i++) {
    int cur = i;
    int l = 0, m = 0, w = 0;
    for (int j = sz1; j < n; j++) {
      int aux = cur % 3;
      l += poss[aux][0] * cost[j][0];
      m += poss[aux][1] * cost[j][1];
      w += poss[aux][2] * cost[j][2];
      cur /= 3;
    }
    s2.insert(make_pair(m - l, m - w));
    auto it = mx2.find(make_pair(m - l, m - w));
    if (it != mx2.end()) {
      if (it->second < l + w + m) {
        m2[make_pair(m - l, m - w)] = i;
        mx2[make_pair(m - l, m - w)] = l + w + m;
      }
    } else {
      m2[make_pair(m - l, m - w)] = i;
      mx2[make_pair(m - l, m - w)] = l + w + m;
    }
  }
  int ans1 = 0;
  int ans2 = 0;
  int mx = -2000000000;
  for (auto x : s1) {
    pair<int, int> i = x.first;
    if (s2.count(make_pair(-i.first, -i.second))) {
      int n1 = x.second;
      int n2 = m2[make_pair(-i.first, -i.second)];
      int nn1 = n1;
      int nn2 = n2;
      int l = 0;
      for (int j = 0; j < sz1; j++) {
        int aux = n1 % 3;
        if (poss[aux][0]) {
          l += cost[j][0];
        }
        n1 /= 3;
      }
      for (int j = 0; j < sz2; j++) {
        int aux = n2 % 3;
        if (poss[aux][0]) {
          l += cost[sz1 + j][0];
        }
        n2 /= 3;
      }
      if (l > mx) {
        mx = l;
        ans1 = nn1;
        ans2 = nn2;
      }
    }
  }
  if (mx == -2000000000)
    cout << "Impossible"
         << "\n";
  else {
    for (int j = 0; j < sz1; j++) {
      int aux = ans1 % 3;
      if (poss[aux][0]) cout << "L";
      if (poss[aux][1]) cout << "M";
      if (poss[aux][2]) cout << "W";
      ans1 /= 3;
      cout << "\n";
    }
    for (int j = 0; j < sz2; j++) {
      int aux = ans2 % 3;
      if (poss[aux][0]) cout << "L";
      if (poss[aux][1]) cout << "M";
      if (poss[aux][2]) cout << "W";
      ans2 /= 3;
      cout << "\n";
    }
  }
  return 0;
}
