#include <bits/stdc++.h>
using namespace std;
struct node {
  string s;
  int maxx;
};
int a[105];
int b[105];
int c[105];
int f[105];
int n, mid, maxx;
string ans;
map<pair<int, int>, node> M;
void update() {
  string tmp;
  tmp.clear();
  int x = 0;
  int y = 0;
  int z = 0;
  for (int i = 1; i <= mid; i++) {
    tmp += (f[i] + '0');
    if (f[i] == 0) {
      x += a[i];
      y += b[i];
    } else if (f[i] == 1) {
      y += b[i];
      z += c[i];
    } else {
      x += a[i];
      z += c[i];
    }
  }
  y -= x;
  z -= x;
  if (M[{y, z}].s == "") {
    M[{y, z}].s = tmp;
    M[{y, z}].maxx = x;
  } else {
    if (x > M[{y, z}].maxx) {
      M[{y, z}].s = tmp;
      M[{y, z}].maxx = x;
    }
  }
}
void bina(int i) {
  for (int j = 0; j <= 2; j++) {
    f[i] = j;
    if (i == mid)
      update();
    else
      bina(i + 1);
  }
}
void solve() {
  string tmp;
  tmp.clear();
  int x = 0;
  int y = 0;
  int z = 0;
  for (int i = mid + 1; i <= n; i++) {
    tmp += (f[i] + '0');
    if (f[i] == 0) {
      x += a[i];
      y += b[i];
    } else if (f[i] == 1) {
      y += b[i];
      z += c[i];
    } else {
      x += a[i];
      z += c[i];
    }
  }
  y -= x;
  z -= x;
  y = -y;
  z = -z;
  if (M[{y, z}].s != "") {
    if (M[{y, z}].maxx + x > maxx) {
      maxx = M[{y, z}].maxx + x;
      ans = M[{y, z}].s + tmp;
    }
  }
}
void binary(int i) {
  for (int j = 0; j <= 2; j++) {
    f[i] = j;
    if (i == n)
      solve();
    else
      binary(i + 1);
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i] >> b[i] >> c[i];
  }
  maxx = -1e9;
  if (n == 1) {
    if (a[n] == 0 && b[n] == 0) {
      cout << "LM";
    } else if (a[n] == 0 && c[n] == 0) {
      cout << "LW";
    } else if (b[n] == 0 && c[n] == 0) {
      cout << "MW";
    } else
      cout << "Impossible";
  } else {
    mid = n / 2;
    bina(1);
    binary(mid + 1);
    if (ans == "")
      cout << "Impossible";
    else {
      for (int i = 0; i < ans.size(); i++) {
        if (ans[i] == '0')
          cout << "LM\n";
        else if (ans[i] == '1')
          cout << "MW\n";
        else
          cout << "WL\n";
      }
    }
  }
  return 0;
}
