#include <bits/stdc++.h>
using namespace std;
const int MAX_STRING_LENGTH = 100000;
struct _io {
  char buff[MAX_STRING_LENGTH];
  _io &operator>>(int &x) {
    scanf("%d", &x);
    return *this;
  }
  _io &operator>>(long long &x) {
    scanf("%lld", &x);
    return *this;
  }
  _io &operator>>(float &x) {
    scanf("%f", &x);
    return *this;
  }
  _io &operator>>(double &x) {
    scanf("%lf", &x);
    return *this;
  }
  _io &operator>>(long double &x) {
    scanf("%Lf", &x);
    return *this;
  }
  _io &operator>>(char &c) {
    scanf("%c", &c);
    return *this;
  }
  _io &operator>>(char *s) {
    scanf("%s", s);
    return *this;
  }
  _io &operator>>(string &s) {
    scanf("%s", buff);
    s = string(buff, strlen(buff));
    return *this;
  }
  _io &operator<<(const int x) {
    printf("%d", x);
    return *this;
  }
  _io &operator<<(const long long x) {
    printf("%lld", x);
    return *this;
  }
  _io &operator<<(const float x) {
    printf("%f", x);
    return *this;
  }
  _io &operator<<(const double &x) {
    printf("%lf", x);
    return *this;
  }
  _io &operator<<(const long double &x) {
    printf("%Lf", x);
    return *this;
  }
  _io operator<<(const char &c) {
    printf("%c", c);
    return *this;
  }
  _io &operator<<(const string &s) {
    printf("%s", s.c_str());
    return *this;
  }
  _io &operator<<(const char *s) {
    printf("%s", s);
    return *this;
  }
} io;
const int maxn = 4e5 + 10;
multimap<pair<int, int>, pair<int, int>> mp;
int a[30], b[30], c[30];
int main() {
  int n;
  io >> n;
  for (int i = 0; i < n; ++i) io >> a[i] >> b[i] >> c[i];
  if (n == 1 && ((a[0] == 0 && b[0] == 0) || (c[0] == 0 && a[0] == 0) ||
                 (b[0] == 0 && c[0] == 0))) {
    if (c[0] != 0) io << "LM";
    if (b[0] != 0) io << "LW";
    if (a[0] != 0) io << "MW";
    if (a[0] == 0 && b[0] == 0 && c[0] == 0) io << "LW";
    return 0;
  }
  int half = (n + 1) / 2;
  int pot = 1;
  for (int i = 0; i < half; ++i) pot *= 3;
  for (int mask = 1; mask <= pot; ++mask) {
    int mm = mask;
    int ac1 = 0;
    int ac2 = 0;
    int ac3 = 0;
    for (int i = 0; i < half; ++i) {
      switch (mm % 3) {
        case 0:
          ac1 += a[i];
          ac2 += b[i];
          break;
        case 1:
          ac2 += b[i];
          ac3 += c[i];
          break;
        case 2:
          ac3 += c[i];
          ac1 += a[i];
          break;
      }
      mm /= 3;
    }
    mp.insert({{ac1 - ac2, ac2 - ac3}, {mask, ac1}});
  }
  pot = 1;
  for (int i = half; i < n; ++i) pot *= 3;
  int m2, m1 = -1;
  int sum = -1e9;
  for (int mask = 1; mask <= pot; ++mask) {
    int mm = mask;
    int ac1 = 0;
    int ac2 = 0;
    int ac3 = 0;
    for (int i = half; i < n; ++i) {
      switch (mm % 3) {
        case 0:
          ac1 += a[i];
          ac2 += b[i];
          break;
        case 1:
          ac2 += b[i];
          ac3 += c[i];
          break;
        case 2:
          ac3 += c[i];
          ac1 += a[i];
          break;
      }
      mm /= 3;
    }
    auto range = mp.equal_range({ac2 - ac1, ac3 - ac2});
    for (auto it = range.first; it != range.second; ++it)
      if (it != mp.end() && sum < it->second.second + ac1) {
        sum = it->second.second + ac1;
        m1 = it->second.first;
        m2 = mask;
      }
  }
  if (m1 == -1) {
    io << "Impossible";
    return 0;
  }
  for (int i = 0; i < half; ++i) {
    switch (m1 % 3) {
      case 0:
        io << "LM"
           << "\n";
        break;
      case 1:
        io << "MW"
           << "\n";
        break;
      case 2:
        io << "LW"
           << "\n";
        break;
    }
    m1 /= 3;
  }
  for (int i = half; i < n; ++i) {
    switch (m2 % 3) {
      case 0:
        io << "LM"
           << "\n";
        break;
      case 1:
        io << "MW"
           << "\n";
        break;
      case 2:
        io << "LW"
           << "\n";
        break;
    }
    m2 /= 3;
  }
  return 0;
}
