#include <bits/stdc++.h>
using namespace std;
int N;
int A[25][3];
using Key = pair<int, int>;
using Value = tuple<int, int, int>;
using Item = pair<Key, Value>;
Key GetKey(const Value& value) {
  return make_pair(get<1>(value) - get<0>(value),
                   get<2>(value) - get<0>(value));
}
void Gen(int idx, int to, Value value, vector<Item>& items) {
  if (idx == to) {
    items.push_back(make_pair(GetKey(value), value));
    return;
  }
  get<0>(value) += A[idx][0];
  get<1>(value) += A[idx][1];
  Gen(idx + 1, to, value, items);
  get<0>(value) -= A[idx][0];
  get<1>(value) -= A[idx][1];
  get<0>(value) += A[idx][0];
  get<2>(value) += A[idx][2];
  Gen(idx + 1, to, value, items);
  get<0>(value) -= A[idx][0];
  get<2>(value) -= A[idx][2];
  get<1>(value) += A[idx][1];
  get<2>(value) += A[idx][2];
  Gen(idx + 1, to, value, items);
  get<1>(value) -= A[idx][1];
  get<2>(value) -= A[idx][2];
}
bool Gen2(int idx, int to, Value value, const Value& need,
          vector<const char*>& way) {
  if (idx == to) {
    if (value == need) {
      for (const char* line : way) {
        cout << line << '\n';
      }
      return true;
    }
    return false;
  }
  get<0>(value) += A[idx][0];
  get<1>(value) += A[idx][1];
  way.push_back("LM");
  if (Gen2(idx + 1, to, value, need, way)) {
    return true;
  }
  way.pop_back();
  get<0>(value) -= A[idx][0];
  get<1>(value) -= A[idx][1];
  get<0>(value) += A[idx][0];
  get<2>(value) += A[idx][2];
  way.push_back("LW");
  if (Gen2(idx + 1, to, value, need, way)) {
    return true;
  }
  way.pop_back();
  get<0>(value) -= A[idx][0];
  get<2>(value) -= A[idx][2];
  get<1>(value) += A[idx][1];
  get<2>(value) += A[idx][2];
  way.push_back("MW");
  if (Gen2(idx + 1, to, value, need, way)) {
    return true;
  }
  way.pop_back();
  get<1>(value) -= A[idx][1];
  get<2>(value) -= A[idx][2];
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> N;
  for (int i = 0; i < N; ++i) {
    for (int j = 0; j < 3; ++j) {
      cin >> A[i][j];
    }
  }
  vector<Item> left, right;
  Gen(0, N / 2, Value(0, 0, 0), left);
  Gen(N / 2, N, Value(0, 0, 0), right);
  sort(left.begin(), left.end(), [](const Item& lhs, const Item& rhs) {
    if (lhs.first != rhs.first) {
      return lhs.first < rhs.first;
    }
    return get<0>(lhs.second) > get<0>(rhs.second);
  });
  int result = numeric_limits<int>::min();
  Value bleft, bright;
  for (const auto& p : right) {
    Key key(-p.first.first, -p.first.second);
    const Value& value = p.second;
    auto cmp = [](const Item& lhs, const Item& rhs) {
      return lhs.first < rhs.first;
    };
    auto it = lower_bound(left.begin(), left.end(), Item(key, value), cmp);
    if (it != left.end() && it->first == key) {
      int cand = get<0>(value) + get<0>(it->second);
      if (result < cand) {
        result = cand;
        bleft = it->second;
        bright = value;
      }
    }
  }
  if (numeric_limits<int>::min() == result) {
    cout << "Impossible" << '\n';
    return 0;
  }
  vector<const char*> way;
  way.clear();
  Gen2(0, N / 2, Value(0, 0, 0), bleft, way);
  way.clear();
  Gen2(N / 2, N, Value(0, 0, 0), bright, way);
  return 0;
}
