#include <bits/stdc++.h>
using namespace std;
char moveStrings[3][5] = {"LM", "LW", "MW"};
int N, arr[30][3], moveList[25];
int cur[3], best[3], suma;
long long moves, bestmoves;
map<pair<int, int>, int> m;
map<pair<int, int>, long long> m2;
void backtrack(int n) {
  if (n == N / 2) {
    int d1 = cur[0] - cur[1];
    int d2 = cur[1] - cur[2];
    pair<int, int> k = pair<int, int>(d1, d2);
    if (m.count(k) == 0 || m[k] < cur[0]) {
      m[k] = cur[0];
      m2[k] = moves;
    }
    return;
  }
  moves *= 10;
  cur[0] += arr[n][0];
  cur[1] += arr[n][1];
  backtrack(n + 1);
  moves++;
  cur[1] -= arr[n][1];
  cur[2] += arr[n][2];
  backtrack(n + 1);
  moves++;
  cur[0] -= arr[n][0];
  cur[1] += arr[n][1];
  backtrack(n + 1);
  cur[1] -= arr[n][1];
  cur[2] -= arr[n][2];
  moves /= 10;
}
void backtrack2(int n) {
  if (n == N) {
    int d1 = cur[1] - cur[0];
    int d2 = cur[2] - cur[1];
    pair<int, int> k = pair<int, int>(d1, d2);
    if (m.count(k) == 0) {
      return;
    }
    if (cur[0] + m[k] > suma) {
      suma = cur[0] + m[k];
      bestmoves = moves;
      memcpy(best, cur, sizeof cur);
    }
    return;
  }
  moves *= 10;
  cur[0] += arr[n][0];
  cur[1] += arr[n][1];
  backtrack2(n + 1);
  moves++;
  cur[1] -= arr[n][1];
  cur[2] += arr[n][2];
  backtrack2(n + 1);
  moves++;
  cur[0] -= arr[n][0];
  cur[1] += arr[n][1];
  backtrack2(n + 1);
  cur[1] -= arr[n][1];
  cur[2] -= arr[n][2];
  moves /= 10;
}
void getMoveList() {
  int da = best[1] - best[0];
  int db = best[2] - best[1];
  long long moveF = m2[pair<int, int>(da, db)];
  for (int i = N / 2 - 1; i >= 0; i--) {
    moveList[i] = moveF % 10;
    moveF /= 10;
  }
  long long moveB = bestmoves;
  for (int i = N - 1; i >= N / 2; i--) {
    moveList[i] = moveB % 10;
    moveB /= 10;
  }
}
int main() {
  int i, j;
  scanf("%d", &N);
  for (i = 0; i < N; i++) {
    for (j = 0; j < 3; j++) {
      scanf("%d", &arr[i][j]);
    }
  }
  memset(cur, 0, sizeof cur);
  moves = 0;
  backtrack(0);
  memset(cur, 0, sizeof cur);
  moves = 0;
  suma = -100000000;
  backtrack2(N / 2);
  if (suma == -100000000) {
    printf("Impossible\n");
  } else {
    getMoveList();
    for (i = 0; i < N; i++) {
      printf("%s\n", moveStrings[moveList[i]]);
    }
  }
  return 0;
}
