#include <bits/stdc++.h>
using namespace std;
template <class T1, class T2>
ostream& operator<<(ostream& c, pair<T1, T2> p) {
  return c << "(" << p.first << ", " << p.second << ")";
}
template <class _T>
inline string tostr(const _T& a) {
  ostringstream os("");
  os << a;
  return os.str();
}
template <class T>
inline T sqr(const T& x) {
  return x * x;
}
const int inf = 0x3f3f3f3f;
const double eps = 1e-7;
int n;
int n2;
int v[3][30];
string name = "LMW";
int cur[3];
map<pair<int, int>, pair<int, string> > m;
char s[500];
void bt(int no = 0) {
  if (no == n2) {
    s[no] = '\0';
    pair<int, int> key = pair<int, int>(cur[1] - cur[0], cur[2] - cur[0]);
    if (m.count(key)) {
      m[key] = max(m[key], make_pair(cur[0], string(s)));
    } else {
      m[key] = make_pair(cur[0], string(s));
    }
    return;
  }
  for (int i = 0, __ = 3; i < __; i++) {
    for (int k = 0, __ = 3; k < __; k++)
      if (k != i) {
        cur[k] += v[k][no];
      }
    s[no] = name[i];
    bt(no + 1);
    for (int k = 0, __ = 3; k < __; k++)
      if (k != i) {
        cur[k] -= v[k][no];
      }
  }
}
pair<int, string> ans = pair<int, string>(-inf, "");
void bt2(int no = n2) {
  if (no == n) {
    s[no] = '\0';
    pair<int, int> key = pair<int, int>(cur[0] - cur[1], cur[0] - cur[2]);
    if (m.count(key)) {
      ans = max(ans, pair<int, string>(m[key].first + cur[0],
                                       m[key].second + (s + n2)));
    }
    return;
  }
  for (int i = 0, __ = 3; i < __; i++) {
    for (int k = 0, __ = 3; k < __; k++)
      if (k != i) {
        cur[k] += v[k][no];
      }
    s[no] = name[i];
    bt2(no + 1);
    for (int k = 0, __ = 3; k < __; k++)
      if (k != i) {
        cur[k] -= v[k][no];
      }
  }
}
string convert(string s) {
  map<char, string> m;
  m['L'] = "MW";
  m['M'] = "LW";
  m['W'] = "LM";
  string a = "";
  for (int i = 0, __ = s.size(); i < __; i++) {
    a += m[s[i]];
    a += '\n';
  }
  return a;
}
int main() {
  cin >> n;
  n2 = n / 2;
  for (int i = 0, __ = n; i < __; i++) {
    for (int j = 0, __ = 3; j < __; j++) {
      cin >> v[j][i];
    }
  }
  bt();
  bt2();
  cerr << ">>> " << ans << '\n';
  ;
  if (ans.second == "")
    ans.second = "Impossible\n";
  else
    ans.second = convert(ans.second);
  cout << ans.second;
  return 0;
}
