#include <bits/stdc++.h>
using namespace std;
struct greater {
  template <class T>
  bool operator()(T const &a, T const &b) const {
    return a > b;
  }
};
int add[26][3], n, hn;
long long originA[2000000];
int oc = 0;
map<pair<long long, long long>, int> p2;
map<pair<long long, long long>, long long> pA;
int maxM1 = -1, maxM2 = -1;
long long maxV = 0;
void dfs2(long long a, long long b, long long c, char i, int mask) {
  if (i == hn) {
    long long ta, tb, tc;
    mask *= 3;
    ta = a + add[i][0];
    tb = b + add[i][1];
    pair<long long, long long> pp = make_pair(0, 0);
    int tmask = mask;
    originA[tmask] = ta;
    pp.first = tb - ta;
    pp.second = c - ta;
    int vv = p2[pp];
    if (vv > 0 && originA[vv - 1] > ta) {
    } else {
      p2[pp] = tmask + 1;
    }
    tb = b + add[i][1];
    tc = c + add[i][2];
    tmask++;
    originA[tmask] = a;
    pp.first = tb - a;
    pp.second = tc - a;
    vv = p2[pp];
    if (vv > 0 && originA[vv - 1] > a) {
    } else {
      p2[pp] = tmask + 1;
    }
    ta = a + add[i][0];
    tc = c + add[i][2];
    tmask++;
    originA[tmask] = ta;
    pp.first = b - ta;
    pp.second = tc - ta;
    vv = p2[pp];
    if (vv > 0 && originA[vv - 1] > ta) {
    } else {
      p2[pp] = tmask + 1;
    }
  } else {
    dfs2(a + add[i][0], b + add[i][1], c, i - 1, mask * 3);
    dfs2(a, b + add[i][1], c + add[i][2], i - 1, mask * 3 + 1);
    dfs2(a + add[i][0], b, c + add[i][2], i - 1, mask * 3 + 2);
  }
}
void dfs1(long long a, long long b, long long c, char i, int mask) {
  if (i >= hn) {
    int vv = p2[make_pair(a - b, a - c)];
    if (vv == 0) {
      return;
    }
    long long nA = originA[vv - 1] + a;
    if (nA > maxV || maxM1 == -1) {
      maxM1 = mask;
      maxM2 = vv - 1;
      maxV = nA;
    }
    return;
  }
  dfs1(a + add[i][0], b + add[i][1], c, i + 1, mask * 3);
  dfs1(a, b + add[i][1], c + add[i][2], i + 1, mask * 3 + 1);
  dfs1(a + add[i][0], b, c + add[i][2], i + 1, mask * 3 + 2);
}
int main() {
  scanf("%d", &n);
  for (int i = (0); (i) < (n); (i)++) {
    scanf("%d %d %d", &add[i][0], &add[i][1], &add[i][2]);
  }
  hn = n / 2;
  if (n == 1) {
    if (add[0][0] == 0 && add[0][1] == 0) {
      printf("LM");
    } else if (add[0][1] == 0 && add[0][2] == 0) {
      printf("MW");
    } else if (add[0][0] == 0 && add[0][2] == 0) {
      printf("LW");
    } else {
      printf("Impossible");
    }
    return 0;
  }
  dfs2(0, 0, 0, n - 1, 0);
  dfs1(0, 0, 0, 0, 0);
  if (maxM1 < 0 || maxM2 < 0) {
    printf("Impossible");
  } else {
    vector<string> orders;
    for (int i = 0; i < hn; i++) {
      if (maxM1 % 3 == 0) {
        orders.push_back("LM");
      } else if (maxM1 % 3 == 1) {
        orders.push_back("MW");
      } else {
        orders.push_back("LW");
      }
      maxM1 /= 3;
    }
    std::reverse(orders.begin(), orders.end());
    for (int i = hn; i < n; i++) {
      if (maxM2 % 3 == 0) {
        orders.push_back("LM");
      } else if (maxM2 % 3 == 1) {
        orders.push_back("MW");
      } else {
        orders.push_back("LW");
      }
      maxM2 /= 3;
    }
    for (auto it = orders.begin(); it != orders.end(); it++) {
      printf("%s\n", it->c_str());
    }
  }
  return 0;
}
