#include <bits/stdc++.h>
using namespace std;
vector<pair<pair<int, int>, pair<int, string> > > v[2], l, r;
vector<pair<pair<int, int>, pair<int, string> > >::iterator it;
int c[26][3];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < (n); ++i)
    for (int j = 0; j < (3); ++j) scanf("%d", &c[i][j]);
  pair<pair<int, int>, pair<int, string> > p, p2;
  int fst, snd, trd, x;
  string s;
  v[1].push_back(make_pair(make_pair(0, 0), make_pair(0, "")));
  for (int i = 0; i < (n / 2); ++i) {
    if (i % 2 == 0) {
      for (int j = 0; j < (v[1].size()); ++j) {
        p = v[1][j];
        snd = p.first.first;
        trd = p.first.second;
        x = p.second.first;
        s = p.second.second;
        p = make_pair(make_pair(snd + c[i][1] - c[i][0], trd - c[i][0]),
                      make_pair(x + c[i][0], s + "W"));
        v[0].push_back(p);
        p = make_pair(make_pair(snd - c[i][0], trd + c[i][2] - c[i][0]),
                      make_pair(x + c[i][0], s + "M"));
        v[0].push_back(p);
        p = make_pair(make_pair(snd + c[i][1], trd + c[i][2]),
                      make_pair(x, s + "L"));
        v[0].push_back(p);
      }
      v[1].clear();
    } else {
      for (int j = 0; j < (v[0].size()); ++j) {
        p = v[0][j];
        snd = p.first.first;
        trd = p.first.second;
        x = p.second.first;
        s = p.second.second;
        p = make_pair(make_pair(snd + c[i][1] - c[i][0], trd - c[i][0]),
                      make_pair(x + c[i][0], s + "W"));
        v[1].push_back(p);
        p = make_pair(make_pair(snd - c[i][0], trd + c[i][2] - c[i][0]),
                      make_pair(x + c[i][0], s + "M"));
        v[1].push_back(p);
        p = make_pair(make_pair(snd + c[i][1], trd + c[i][2]),
                      make_pair(x, s + "L"));
        v[1].push_back(p);
      }
      v[0].clear();
    }
  }
  if (v[0].empty()) {
    l = v[1];
    v[1].clear();
    v[1].push_back(make_pair(make_pair(0, 0), make_pair(0, "")));
  } else {
    l = v[0];
    v[0].clear();
    v[0].push_back(make_pair(make_pair(0, 0), make_pair(0, "")));
  }
  for (int i = (n / 2); i < (n); ++i) {
    if (i % 2 == 0) {
      for (int j = 0; j < (v[1].size()); ++j) {
        p = v[1][j];
        snd = p.first.first;
        trd = p.first.second;
        x = p.second.first;
        s = p.second.second;
        p = make_pair(make_pair(snd + c[i][1] - c[i][0], trd - c[i][0]),
                      make_pair(x + c[i][0], s + "W"));
        v[0].push_back(p);
        p = make_pair(make_pair(snd - c[i][0], trd + c[i][2] - c[i][0]),
                      make_pair(x + c[i][0], s + "M"));
        v[0].push_back(p);
        p = make_pair(make_pair(snd + c[i][1], trd + c[i][2]),
                      make_pair(x, s + "L"));
        v[0].push_back(p);
      }
      v[1].clear();
    } else {
      for (int j = 0; j < (v[0].size()); ++j) {
        p = v[0][j];
        snd = p.first.first;
        trd = p.first.second;
        x = p.second.first;
        s = p.second.second;
        p = make_pair(make_pair(snd + c[i][1] - c[i][0], trd - c[i][0]),
                      make_pair(x + c[i][0], s + "W"));
        v[1].push_back(p);
        p = make_pair(make_pair(snd - c[i][0], trd + c[i][2] - c[i][0]),
                      make_pair(x + c[i][0], s + "M"));
        v[1].push_back(p);
        p = make_pair(make_pair(snd + c[i][1], trd + c[i][2]),
                      make_pair(x, s + "L"));
        v[1].push_back(p);
      }
      v[0].clear();
    }
  }
  if (v[0].empty())
    r = v[1];
  else
    r = v[0];
  int res = -1000000000;
  string ans = "Impossible";
  sort(r.begin(), r.end());
  for (int i = 0; i < (l.size()); ++i) {
    p = l[i];
    p.first.first *= -1;
    p.first.second *= -1;
    snd = p.first.first;
    trd = p.first.second;
    p2 = p;
    p2.second.first = 1000000000;
    it = lower_bound(r.begin(), r.end(), p2);
    if (it == r.begin()) continue;
    --it;
    p2 = *it;
    if ((p.first.first == p2.first.first) &&
        (p.first.second == p2.first.second)) {
      if (p.second.first + p2.second.first > res) {
        ans = p.second.second + p2.second.second;
        res = p.second.first + p2.second.first;
      }
    }
  }
  if (ans == "Impossible")
    cout << ans;
  else {
    for (int i = 0; i < (ans.length()); ++i) {
      if (ans[i] == 'W')
        printf("LM\n");
      else if (ans[i] == 'M')
        printf("LW\n");
      else
        printf("WM\n");
    }
  }
  return 0;
}
