#include <bits/stdc++.h>
using namespace std;
struct pct {
  int x, y, z;
};
vector<pct> v1, v2;
vector<pair<pct, int> > vf1, vf2;
pct a;
void backx1(int x, int num) {
  if (v1.size() == x) {
    vf1.push_back(make_pair(a, num));
  } else {
    a.y += v1[x].y;
    a.z += v1[x].z;
    backx1(x + 1, num * 3);
    a.y -= v1[x].y;
    a.z -= v1[x].z;
    a.z += v1[x].z;
    a.x += v1[x].x;
    backx1(x + 1, num * 3 + 1);
    a.x -= v1[x].x;
    a.z -= v1[x].z;
    a.x += v1[x].x;
    a.y += v1[x].y;
    backx1(x + 1, num * 3 + 2);
    a.x -= v1[x].x;
    a.y -= v1[x].y;
  }
}
void backx2(int x, int num) {
  if (v2.size() == x) {
    vf2.push_back(make_pair(a, num));
  } else {
    a.y += v2[x].y;
    a.z += v2[x].z;
    backx2(x + 1, num * 3);
    a.y -= v2[x].y;
    a.z -= v2[x].z;
    a.z += v2[x].z;
    a.x += v2[x].x;
    backx2(x + 1, num * 3 + 1);
    a.x -= v2[x].x;
    a.z -= v2[x].z;
    a.x += v2[x].x;
    a.y += v2[x].y;
    backx2(x + 1, num * 3 + 2);
    a.x -= v2[x].x;
    a.y -= v2[x].y;
  }
}
inline pair<int, pair<int, int> > get(pct a) {
  return make_pair(a.x, make_pair(a.y, a.z));
}
namespace std {
template <>
struct hash<pair<int, pair<int, int> > > {
 public:
  size_t operator()(pair<int, pair<int, int> > x) const throw() {
    size_t h = x.first + x.second.first * 7 + x.second.second * 11;
    return h;
  }
};
}  // namespace std
string sr[] = {"MW", "LW", "LM"};
unordered_map<pair<int, pair<int, int> >, int> h1, h2;
int main() {
  int T;
  int N;
  cin >> N;
  for (int i = 1; i <= N; ++i) {
    if (v1.size() <= 11) {
      pct a;
      cin >> a.x >> a.y >> a.z;
      v1.push_back(a);
    } else {
      pct a;
      cin >> a.x >> a.y >> a.z;
      v2.push_back(a);
    }
  }
  reverse(v1.begin(), v1.end());
  if (v2.size() > 0) reverse(v2.begin(), v2.end());
  a.x = a.y = a.z = 0;
  backx1(0, 0);
  a.x = a.y = a.z = 0;
  backx2(0, 0);
  for (auto &x1 : vf1) {
    auto x = x1.first;
    int a = min(x.x, min(x.y, x.z));
    x.x -= a;
    x.y -= a;
    x.z -= a;
    if (h2.find(get(x)) == h2.end()) {
      h2[get(x)] = a;
      h1[get(x)] = x1.second + 1;
    }
    if (h2[get(x)] < a) {
      h2[get(x)] = max(h2[get(x)], a);
      h1[get(x)] = x1.second + 1;
    }
  }
  int ret1 = -1, ret2 = -1;
  int ret3 = -101010;
  for (auto &x1 : vf2) {
    auto x = x1.first;
    int a = max(x.x, max(x.y, x.z));
    x.x -= a;
    x.y -= a;
    x.z -= a;
    x.x *= -1;
    x.y *= -1;
    x.z *= -1;
    int xz = h1[get(x)];
    if (xz != 0) {
      int yz = h2[get(x)];
      if (ret1 == -1 || (yz + a > ret3)) {
        ret1 = xz - 1;
        ret2 = x1.second;
        ret3 = a + yz;
      }
    }
  }
  if (ret1 == -1) {
    cout << "Impossible";
    return 0;
  }
  for (int i = 0; i < v1.size(); ++i) {
    cout << sr[ret1 % 3] << "\n";
    ret1 /= 3;
  }
  for (int i = 0; i < v2.size(); ++i) {
    cout << sr[ret2 % 3] << "\n";
    ret2 /= 3;
  }
  return 0;
}
