#include <bits/stdc++.h>
using namespace std;
long long inline ipow(long long a, long long b, long long m) {
  long long val = 1;
  a %= m;
  while (b) {
    if (b & 01) val = (val * a) % m;
    b >>= 1;
    a = (a * a) % m;
  };
  return val % m;
}
long long inline ipow(long long a, long long b) {
  long long val = 1;
  while (b) {
    if (b & 01) val = (val * a);
    b >>= 1;
    a = (a * a);
  };
  return val;
}
int constructSegmentTree(int* arr, int* segArr, int start, int end, int pos) {
  if (start == end) {
    segArr[pos] = arr[start];
    return segArr[pos];
  }
  int mid = start + (end - start) / 2;
  segArr[pos] = constructSegmentTree(arr, segArr, start, mid, 2 * pos + 1) +
                constructSegmentTree(arr, segArr, mid + 1, end, 2 * pos + 2);
  return segArr[pos];
}
int* segmentTree(int* arr, int n) {
  int first = (int)(ceil(log2(n)));
  first = 2 * pow(2, first) - 1;
  int* st = new int[first];
  constructSegmentTree(arr, st, 0, n - 1, 0);
  return st;
}
int getSumUtil(int* st, int qstart, int qend, int sstart, int send, int pos) {
  if (qstart <= sstart && qend >= send) return st[pos];
  if (qstart > send || qend < sstart) return 0;
  int mid = sstart + (send - sstart) / 2;
  return getSumUtil(st, qstart, qend, sstart, mid, 2 * pos + 1) +
         getSumUtil(st, qstart, qend, mid + 1, send, 2 * pos + 2);
}
int getSum(int* st, int n, int qstart, int qend) {
  return getSumUtil(st, qstart, qend, 0, n - 1, 0);
}
void updateValueUtil(int* st, int i, int sstart, int send, int diff, int pos) {
  if (i < sstart || i > send) return;
  st[pos] += diff;
  int mid = sstart + (send - sstart) / 2;
  if (sstart != send) {
    updateValueUtil(st, i, sstart, mid, diff, 2 * pos + 1);
    updateValueUtil(st, i, mid + 1, send, diff, 2 * pos + 2);
  }
  return;
}
void updateValue(int* arr, int* st, int n, int i, int new_val) {
  int diff = new_val - arr[i];
  arr[i] = new_val;
  updateValueUtil(st, i, 0, n - 1, diff, 0);
}
int len(int n) {
  int ans = 0;
  while (n) {
    ans += 1 & n;
    n >>= 1;
  }
  return ans;
}
long long int expo(long long int a, long long int b) {
  long long int result;
  if (b == 0) return 1;
  if (b == 2) return (a * a) % 1000000007;
  if (b == 1) return a % 1000000007;
  if (b % 2 == 1) {
    return (a * expo(a, b - 1)) % 1000000007;
  } else {
    result = expo(a, b / 2) % 1000000007;
    return (result * result) % 1000000007;
  }
}
int N, maxAttitude;
long long int moves, bestmoves;
int val[3], bestVal[3], l[30], m[30], w[30];
string movesList[30];
map<pair<int, int>, int> m1;
map<pair<int, int>, long long int> m2;
void backtrack(int n) {
  if (n == N / 2) {
    int d1 = val[0] - val[1], d2 = val[1] - val[2];
    pair<int, int> p(d1, d2);
    if (m1.count(p) == 0 || m1[p] < val[0]) {
      m1[p] = val[0];
      m2[p] = moves;
    }
    return;
  }
  moves *= 10;
  val[0] += l[n];
  val[1] += m[n];
  backtrack(n + 1);
  moves++;
  val[1] -= m[n];
  val[2] += w[n];
  backtrack(n + 1);
  moves++;
  val[0] -= l[n];
  val[1] += m[n];
  backtrack(n + 1);
  val[1] -= m[n];
  val[2] -= w[n];
  moves /= 10;
}
void backtrack2(int n) {
  if (n == N) {
    int d1 = val[1] - val[0], d2 = val[2] - val[1];
    pair<int, int> p(d1, d2);
    if (m1.count(p) == 0) return;
    if (val[0] + m1[p] > maxAttitude) {
      maxAttitude = val[0] + m1[p];
      bestmoves = moves;
      memcpy(bestVal, val, sizeof val);
    }
    return;
  }
  moves *= 10;
  val[0] += l[n];
  val[1] += m[n];
  backtrack2(n + 1);
  moves++;
  val[1] -= m[n];
  val[2] += w[n];
  backtrack2(n + 1);
  moves++;
  val[0] -= l[n];
  val[1] += m[n];
  backtrack2(n + 1);
  val[1] -= m[n];
  val[2] -= w[n];
  moves /= 10;
}
void getMovesList() {
  int bestD1 = bestVal[1] - bestVal[0], bestD2 = bestVal[2] - bestVal[1];
  long long int moveFirst = m2[make_pair(bestD1, bestD2)];
  for (int i = N / 2 - 1; i >= 0; --i) {
    if (moveFirst % 10 == 0)
      movesList[i] = "LM";
    else if (moveFirst % 10 == 1)
      movesList[i] = "LW";
    else
      movesList[i] = "MW";
    moveFirst /= 10;
  }
  long long int moveSecond = bestmoves;
  for (int i = N - 1; i >= N / 2; --i) {
    if (moveSecond % 10 == 0)
      movesList[i] = "LM";
    else if (moveSecond % 10 == 1)
      movesList[i] = "LW";
    else
      movesList[i] = "MW";
    moveSecond /= 10;
  }
}
int main() {
  cin >> N;
  for (int i = 0; i < N; ++i) {
    cin >> l[i] >> m[i] >> w[i];
  }
  backtrack(0);
  memset(val, 0, sizeof val);
  moves = 0;
  maxAttitude = INT_MIN;
  backtrack2(N / 2);
  if (maxAttitude == INT_MIN) {
    cout << "Impossible" << endl;
  } else {
    getMovesList();
    for (int i = 0; i < N; ++i) {
      cout << movesList[i] << endl;
    }
  }
  return 0;
}
