#include <bits/stdc++.h>
class MapValue {
 public:
  std::string configuration;
  int s1;
  MapValue() {}
  MapValue(std::string configuration, int s1)
      : configuration(configuration), s1(s1) {}
};
class PairHash {
 public:
  std::size_t operator()(const std::pair<int, int> &p) const {
    return std::hash<int>()(p.first) ^ std::hash<int>()(p.second);
  }
};
std::unordered_map<std::pair<int, int>, MapValue, PairHash> my_map;
int A[100], B[100], C[100], q_rez = -0x3f3f3f3f;
std::string rrr = "Impossible";
void back(int s1, int s2, int s3, int k, int max, std::string ss) {
  if (k == max + 1) {
    my_map.emplace(std::make_pair(s2 - s1, s3 - s2), MapValue(ss, s1));
    return;
  }
  s1 += A[k];
  s2 += B[k];
  back(s1, s2, s3, k + 1, max, ss + "LM\n");
  s1 -= A[k];
  s3 += C[k];
  back(s1, s2, s3, k + 1, max, ss + "MW\n");
  s2 -= B[k];
  s1 += A[k];
  back(s1, s2, s3, k + 1, max, ss + "LW\n");
}
void back2(int s1, int s2, int s3, int k, int max, std::string ss) {
  if (k == max + 1) {
    std::string result;
    auto it = my_map.find(std::make_pair(s1 - s2, s2 - s3));
    if (it != my_map.end()) {
      int q = s1 + it->second.s1;
      if (q > q_rez) {
        rrr = it->second.configuration + ss;
        q_rez = q;
      }
    }
    return;
  }
  s1 += A[k];
  s2 += B[k];
  back2(s1, s2, s3, k + 1, max, ss + "LM\n");
  s1 -= A[k];
  s3 += C[k];
  back2(s1, s2, s3, k + 1, max, ss + "MW\n");
  s2 -= B[k];
  s1 += A[k];
  back2(s1, s2, s3, k + 1, max, ss + "LW\n");
}
int main() {
  int N;
  std::cin >> N;
  for (int i = 1; i <= N; i++) {
    std::cin >> A[i] >> B[i] >> C[i];
  }
  std::string ss = "";
  back(0, 0, 0, 1, N / 2, ss);
  ss = "";
  back2(0, 0, 0, N / 2 + 1, N, ss);
  std::cout << rrr;
}
