#include <bits/stdc++.h>
using namespace std;
map<pair<int, int>, pair<int, long long>> mp2;
int n, mx = INT_MIN;
long long best;
long long power(int x, unsigned int y) {
  long long temp;
  if (y == 0) return 1;
  temp = power(x, y / 2);
  if (y % 2 == 0)
    return temp * temp;
  else
    return x * temp * temp;
}
void completeSearch(long long taken, vector<int>& attitude, int index,
                    vector<int> v[], int sz) {
  if (index == sz) {
    if (mp2.find({attitude[1] - attitude[0], attitude[2] - attitude[1]}) ==
            mp2.end() ||
        attitude[0] >
            mp2[{attitude[1] - attitude[0], attitude[2] - attitude[1]}].first) {
      mp2[make_pair(attitude[1] - attitude[0], attitude[2] - attitude[1])] = {
          attitude[0], taken};
    }
    return;
  }
  for (int i = 0; i < 3; i++) {
    attitude[i] += v[index][i];
    attitude[(i + 1) % 3] += v[index][(i + 1) % 3];
    completeSearch(taken * 4 + (i + 1), attitude, index + 1, v, sz);
    attitude[i] -= v[index][i];
    attitude[(i + 1) % 3] -= v[index][(i + 1) % 3];
  }
}
void solve(long long taken, vector<int>& attitude, int index, vector<int> v[],
           int sz) {
  if (index == sz) {
    auto it2 = mp2.find(
        make_pair(attitude[0] - attitude[1], attitude[1] - attitude[2]));
    if (it2 != mp2.end()) {
      int temp = (it2->first).first + (it2->first).second +
                 (it2->second).first + attitude[2];
      if (temp > mx) {
        mx = temp;
        best = it2->second.second + taken * power(4, n / 2);
      }
    }
    return;
  }
  for (int i = 0; i < 3; i++) {
    attitude[i] += v[index][i];
    attitude[(i + 1) % 3] += v[index][(i + 1) % 3];
    solve(taken * 4 + (i + 1), attitude, index + 1, v, sz);
    attitude[i] -= v[index][i];
    attitude[(i + 1) % 3] -= v[index][(i + 1) % 3];
  }
}
void print(long long ans, int index) {
  if (index == n) {
    return;
  }
  print(ans / 4, index + 1);
  switch (ans % 4) {
    case 1:
      printf("LM\n");
      break;
    case 2:
      printf("MW\n");
      break;
    case 3:
      printf("LW\n");
      break;
  }
}
int main() {
  cin >> n;
  vector<int> v1[13];
  vector<int> v2[13];
  int temp;
  for (int i = 0; i < ceil(n / 2.0); i++) {
    for (int j = 0; j < 3; j++) {
      cin >> temp;
      v1[i].push_back(temp);
    }
  }
  for (int i = 0; i < n / 2; i++) {
    for (int j = 0; j < 3; j++) {
      cin >> temp;
      v2[i].push_back(temp);
    }
  }
  vector<int> attitude(3);
  for (int j = 0; j < 3; j++) {
    attitude[j] = 0;
  }
  completeSearch(0, attitude, 0, v2, n / 2);
  solve(0, attitude, 0, v1, ceil(n / 2.0));
  int mx = INT_MIN;
  if (best == 0) {
    cout << "Impossible";
  } else {
    print(best, 0);
  }
}
