#include <bits/stdc++.h>
using namespace std;
struct cp {
  int add1, add2, val;
  cp() {}
  cp(int A, int B, int C) : add1(A), add2(B), val(C) {}
};
struct cp2 {
  int x, y, z;
};
vector<cp> H[666013];
cp2 v[30];
void insert(cp x) {
  int key = (long long)((long long)x.add1 * x.add2) % 666013;
  if (key < 0) key += 666013;
  for (int i = 0; i < H[key].size(); i++)
    if (H[key][i].add1 == x.add1 && H[key][i].add2 == x.add2 &&
        H[key][i].val == x.val) {
      return;
    }
  H[key].push_back(x);
}
cp h_val1;
int get_max(cp y) {
  cp x = cp(-y.add1, -y.add2, y.val);
  int key = (long long)((long long)x.add1 * x.add2) % 666013;
  if (key < 0) key += 666013;
  int i;
  int ans = -1000000000;
  for (i = 0; i < H[key].size(); i++) {
    if (H[key][i].add1 == x.add1 && H[key][i].add2 == x.add2) {
      if (ans < x.val + H[key][i].val) {
        ans = x.val + H[key][i].val;
        h_val1 = H[key][i];
      }
    }
  }
  return ans;
}
int st[30];
int ans = -1000000000;
cp ans_val1, ans_val2;
void back(int left, int right, int type) {
  int i, sx, sy, sz;
  cp rep;
  int k = left;
  st[k] = -1;
  while (k > left - 1)
    if (st[k] < 2) {
      st[k]++;
      if (k == right) {
        sx = sy = sz = 0;
        for (i = left; i <= right; i++)
          if (st[i] == 0) {
            sx += v[i].x;
            sy += v[i].y;
          } else if (st[i] == 1) {
            sx += v[i].x;
            sz += v[i].z;
          } else {
            sz += v[i].z;
            sy += v[i].y;
          }
        rep = cp(sx - sy, sx - sz, sx);
        if (type == 0)
          insert(rep);
        else {
          int now = get_max(rep);
          if (ans < now) {
            ans = now;
            ans_val1 = h_val1;
            ans_val2 = rep;
          }
        }
      } else {
        st[++k] = -1;
      }
    } else
      k--;
}
void print(int left, int right) {
  int i;
  for (i = left; i <= right; i++)
    if (st[i] == 0) {
      printf("LM\n");
    } else if (st[i] == 1)
      printf("LW\n");
    else
      printf("MW\n");
}
void recon(int left, int right, int type) {
  int i, sx, sy, sz;
  cp rep;
  int k = left;
  st[k] = -1;
  while (k > left - 1)
    if (st[k] < 2) {
      st[k]++;
      if (k == right) {
        sx = sy = sz = 0;
        for (i = left; i <= right; i++)
          if (st[i] == 0) {
            sx += v[i].x;
            sy += v[i].y;
          } else if (st[i] == 1) {
            sx += v[i].x;
            sz += v[i].z;
          } else {
            sz += v[i].z;
            sy += v[i].y;
          }
        rep = cp(sx - sy, sx - sz, sx);
        if (type == 0) {
          if (rep.add1 == ans_val1.add1 && rep.add2 == ans_val1.add2 &&
              rep.val == ans_val1.val) {
            print(left, right);
            break;
          }
        } else {
          if (rep.add1 == ans_val2.add1 && rep.add2 == ans_val2.add2 &&
              rep.val == ans_val2.val) {
            print(left, right);
            break;
          }
        }
      } else {
        st[++k] = -1;
      }
    } else
      k--;
}
int n;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d %d %d", &v[i].x, &v[i].y, &v[i].z);
  if (n == 1) {
    int sx, sy, sz;
    for (int i = 0; i < 3; i++) {
      sx = sy = sz = 0;
      if (i == 0) {
        sx = v[1].x;
        sy = v[1].y;
      } else if (i == 1) {
        sx = v[1].x;
        sz = v[1].z;
      } else {
        sz = v[1].z;
        sy = v[1].y;
      }
      if (sx == sy && sy == sz && sx > ans) {
        ans = sx;
        st[1] = i;
      }
    }
    if (ans == -1000000000)
      printf("Impossible");
    else
      print(1, 1);
    return 0;
  }
  back(1, n / 2, 0);
  back(n / 2 + 1, n, 1);
  if (ans == -1000000000) {
    printf("Impossible");
    return 0;
  }
  recon(1, n / 2, 0);
  recon(n / 2 + 1, n, 1);
  return 0;
}
