#include <bits/stdc++.h>
using namespace std;
const int base = 3;
struct node {
  long long y, z;
  node(long long a, long long b) {
    y = a;
    z = b;
  }
  bool operator<(const node &head) const {
    return head.y == y ? head.z < z : head.y < y;
  }
};
map<node, int> mp;
struct info {
  int choice;
  long long x;
} f[2000001];
int m, n;
int has = 0;
struct self {
  int x, y, z;
} s[33];
long long ans;
int choicex, choicey;
int ipow(int i, int k) {
  if (k == 0) return 1;
  return i * ipow(i, k - 1);
}
void add(long long &a, long long &b, long long &c, int k, int i) {
  if (k == 0) {
    a += s[i].x;
    b += s[i].y;
  }
  if (k == 1) {
    a += s[i].x;
    c += s[i].z;
  }
  if (k == 2) {
    b += s[i].y;
    c += s[i].z;
  }
}
void add(int u) {
  int v = u;
  long long x = 0, y = 0, z = 0;
  for (int i = n; i >= 1; i--) {
    add(x, y, z, v % 3, i);
    v /= 3;
  }
  y -= x;
  z -= x;
  node t = node(y, z);
  if (mp.find(t) == mp.end()) {
    has++;
    mp[t] = has;
    f[has].x = x;
    f[has].choice = u;
  } else {
    int pos = mp[t];
    if (f[pos].x < x) {
      f[pos].x = x;
      f[pos].choice = u;
    }
  }
}
void calc(int u) {
  int v = u;
  long long x = 0, y = 0, z = 0;
  for (int i = n + 1; i <= m; i++) {
    add(x, y, z, v % 3, i);
    v /= 3;
  }
  y -= x;
  z -= x;
  node t = node(-y, -z);
  if (mp.find(t) != mp.end()) {
    int pos = mp[t];
    if (f[pos].x + x > ans) {
      ans = f[pos].x + x;
      choicex = f[pos].choice;
      choicey = u;
    }
  }
}
void rep(int i, int u) {
  if (i == 1) {
    int t = u % 3;
    if (t == 0) printf("LM\n");
    if (t == 1) printf("LW\n");
    if (t == 2) printf("MW\n");
    return;
  }
  rep(i - 1, u / 3);
  int t = u % 3;
  if (t == 0) printf("LM\n");
  if (t == 1) printf("LW\n");
  if (t == 2) printf("MW\n");
}
void p(int i, int u) {
  while (i <= m) {
    int t = u % 3;
    u /= 3;
    i++;
    if (t == 0) printf("LM\n");
    if (t == 1) printf("LW\n");
    if (t == 2) printf("MW\n");
  }
}
void print(int l, int r) {
  rep(n, l);
  p(n + 1, r);
}
int main() {
  ans = -1e14;
  scanf("%d", &m);
  for (int i = 1; i <= m; i++) scanf("%d%d%d", &s[i].x, &s[i].y, &s[i].z);
  if (m % 2 == 0)
    n = m / 2;
  else
    n = m / 2 + 1;
  for (int i = 0; i < ipow(3, n); i++) add(i);
  for (int i = 0; i < ipow(3, m - n); i++) calc(i);
  if (ans != -1e14)
    print(choicex, choicey);
  else
    printf("Impossible\n");
  return 0;
}
