#include <bits/stdc++.h>
using namespace std;
template <class T>
struct mypair {
  T x, y;

 public:
  mypair() : x(0), y(0) {}
  mypair(T x, T y) : x(x), y(y) {}
  bool operator<(const mypair<T> &o) const {
    return (x == o.x) ? (y < o.y) : (x < o.x);
  }
  bool operator>(const mypair<T> &o) const { return o < *this; }
  bool operator!=(const mypair<T> &o) const {
    return (*this < o) || (o < *this);
  }
  bool operator==(const mypair<T> &o) const { return !(*this != o); }
  mypair<T> operator+(const mypair<T> &o) {
    return mypair<T>(x + o.x, y + o.y);
  }
  mypair<T> operator*(const long long &n) const {
    return mypair<T>(n * x, n * y);
  }
  mypair<T> operator/(const long long &n) const {
    return mypair<T>(x / n, y / n);
  }
  mypair<T> operator-(const mypair<T> &o) const { return *this + (-1LL) * o; }
  long long operator*(const mypair<T> &o) const {
    return x * 1LL * o.x + y * 1LL * o.y;
  }
  long long cross(const mypair<T> &o) { return x * 1LL * o.y - y * 1LL * o.x; }
  mypair<T> conj() { return mypair<T>(x, -y); }
  mypair<T> operator/(const mypair<T> &o) const {
    return (*this * o.conj()) / hypot(o.x, o.y);
  }
  double angle() {
    double t = atan2(y, x);
    if (t < 0) t += acos(-1);
    return t;
  }
  friend ostream &operator<<(ostream &stream, const mypair<T> &p) {
    stream << "(" << p.x << " ," << p.y << ")";
    return stream;
  }
  friend istream &operator>>(istream &stream, mypair<T> &p) {
    stream >> p.x >> p.y;
    return stream;
  }
  friend void swap(mypair<T> &u, mypair<T> &v) {
    using std::swap;
    u.x ^= v.x ^= u.x ^= v.x;
    u.y ^= v.y ^= u.y ^= v.y;
  }
};
long long L[25], M[25], W[25];
unordered_map<
    long long,
    unordered_map<long long,
                  pair<long long, vector<pair<int, pair<int, int> > > > > >
    F;
vector<pair<int, pair<int, int> > > RR, LL;
long long tot = LLONG_MIN;
void insert(long long a, long long b, long long c,
            vector<pair<int, pair<int, int> > > &C) {
  if (F.find(a) == F.end())
    F[a] =
        unordered_map<long long,
                      pair<long long, vector<pair<int, pair<int, int> > > > >();
  if (F[a].find(b) == F[a].end()) F[a][b] = make_pair(c, C);
  if (F[a][b].first < c) F[a][b] = make_pair(c, C);
}
void contains(long long a, long long b, long long c,
              vector<pair<int, pair<int, int> > > &C) {
  if (F.find(a) == F.end()) return;
  if (F[a].find(b) == F[a].end()) return;
  if (c + F[a][b].first >= tot) {
    tot = c + F[a][b].first;
    LL = F[a][b].second;
    RR = C;
  }
}
void generate(int i, int n, vector<pair<int, pair<int, int> > > &C,
              long long *L, long long *M, long long *W, bool cond) {
  if (i == n) {
    long long a = 0, b = 0, c = 0;
    for (int j = 0; j < (n); j++) {
      auto &p = C[j];
      a += p.first * L[j];
      b += p.second.first * M[j];
      c += p.second.second * W[j];
    }
    if (cond)
      insert(a - b, b - c, a, C);
    else
      contains(b - a, c - b, a, C);
    return;
  }
  C[i].first = 1;
  C[i].second.first = 1;
  C[i].second.second = 0;
  generate(i + 1, n, C, L, M, W, cond);
  C[i].first = 1;
  C[i].second.first = 0;
  C[i].second.second = 1;
  generate(i + 1, n, C, L, M, W, cond);
  C[i].first = 0;
  C[i].second.first = 1;
  C[i].second.second = 1;
  generate(i + 1, n, C, L, M, W, cond);
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < (n); i++) scanf("%I64d %I64d %I64d", L + i, M + i, W + i);
  if (n == 1) {
    if (L[0] == M[0] && M[0] == 0)
      cout << "LM" << endl;
    else if (L[0] == W[0] && W[0] == 0)
      cout << "LW" << endl;
    else if (M[0] == W[0] && W[0] == 0)
      cout << "MW" << endl;
    else
      cout << "Impossible" << endl;
    return 0;
  }
  vector<pair<int, pair<int, int> > > C(n / 2);
  generate(0, n / 2, C, L, M, W, 1);
  C.resize(n - (n / 2));
  generate(0, n - (n / 2), C, L + (n / 2), M + (n / 2), W + (n / 2), 0);
  if (LL.empty())
    puts("Impossible");
  else {
    for (auto p : LL) {
      if (p.first) putchar('L');
      if (p.second.first) putchar('M');
      if (p.second.second) putchar('W');
      puts("");
    }
    for (auto p : RR) {
      if (p.first) putchar('L');
      if (p.second.first) putchar('M');
      if (p.second.second) putchar('W');
      puts("");
    }
  }
  return 0;
}
