#include <bits/stdc++.h>
using namespace std;
const int MAX = 26;
int m;
int n;
int c[MAX][3];
struct str {
  int key;
  pair<int, int> delta;
  int p;
  friend bool operator<(const str &a, const str &b) {
    return a.delta < b.delta;
  }
};
vector<int> pa;
vector<int> push_back;
vector<str> A;
vector<str> B;
int tmp = 0;
bool prvi;
void get(int l, int x) {
  if (l == x) {
    if (prvi)
      pa.push_back(tmp);
    else
      push_back.push_back(tmp);
    return;
  }
  for (int i = 0; i < 3; ++i) {
    tmp *= 3;
    tmp += i;
    get(l + 1, x);
    tmp /= 3;
  }
}
void gen(int mask) {
  int s0, s1, s2;
  int mask2 = mask;
  s0 = s1 = s2 = 0;
  int last;
  if (prvi) {
    for (int i = 0; i < m; ++i) {
      last = mask % 3;
      mask /= 3;
      if (last == 0) {
        s1 += c[i][1];
        s2 += c[i][2];
      } else if (last == 1) {
        s0 += c[i][0];
        s2 += c[i][2];
      } else {
        s0 += c[i][0];
        s1 += c[i][1];
      }
    }
  } else {
    for (int i = 0; i < n - m; ++i) {
      last = mask % 3;
      mask /= 3;
      if (last == 0) {
        s1 += c[i + m][1];
        s2 += c[i + m][2];
      } else if (last == 1) {
        s0 += c[i + m][0];
        s2 += c[i + m][2];
      } else {
        s0 += c[i + m][0];
        s1 += c[i + m][1];
      }
    }
  }
  str tmp;
  tmp.delta.first = s1 - s0;
  tmp.delta.second = s2 - s0;
  tmp.key = mask2;
  tmp.p = s0;
  if (prvi)
    A.push_back(tmp);
  else
    B.push_back(tmp);
}
vector<string> sol;
void track(int a, int b) {
  for (int i = 0; i < m; ++i) {
    int last = a % 3;
    a /= 3;
    if (last == 0)
      sol.push_back("MW");
    else if (last == 1)
      sol.push_back("LW");
    else
      sol.push_back("LM");
  }
  for (int i = 0; i < n - m; ++i) {
    int last = b % 3;
    b /= 3;
    if (last == 0)
      sol.push_back("MW");
    else if (last == 1)
      sol.push_back("LW");
    else
      sol.push_back("LM");
  }
  for (int i = 0; i < sol.size(); ++i) cout << sol[i] << "\n";
}
set<str> s;
void sredi() {
  for (int i = 0; i < B.size(); ++i) {
    set<str>::iterator it = s.find(B[i]);
    if (it == s.end())
      s.insert(B[i]);
    else if (B[i].p > it->p)
      s.erase(it), s.insert(B[i]);
  }
}
int main() {
  cin >> n;
  m = n / 2;
  for (int i = 0; i < n; ++i) cin >> c[i][0] >> c[i][1] >> c[i][2];
  if (n == 0) {
    if (!c[0][1] && !c[0][2])
      cout << "MW\n";
    else if (!c[0][0] && !c[0][2])
      cout << "LW\n";
    else if (!c[0][0] && !c[0][1])
      cout << "LM\n";
    else
      cout << "Impossible\n";
    return 0;
  }
  prvi = true;
  get(0, m);
  prvi = false;
  get(0, n - m);
  prvi = true;
  for (int i = 0; i < pa.size(); ++i) gen(pa[i]);
  prvi = false;
  for (int i = 0; i < push_back.size(); ++i) gen(push_back[i]);
  pair<int, int> sol;
  int best = -1e9;
  sredi();
  for (int i = 0; i < A.size(); ++i) {
    str tmp = A[i];
    tmp.delta.first = -tmp.delta.first;
    tmp.delta.second = -tmp.delta.second;
    set<str>::iterator it = s.find(tmp);
    if (it != s.end()) {
      if (best < tmp.p + it->p) {
        best = tmp.p + it->p;
        sol = {tmp.key, it->key};
      }
    }
  }
  if (best != -1e9)
    track(sol.first, sol.second);
  else
    cout << "Impossible\n";
}
