#include <bits/stdc++.h>
using namespace std;
const int INF = 2000000000;
const int NMax = 30;
const int MOD = 666013;
const int X = 7;
const int Y = 13;
int N;
struct str {
  int x, y, z;
  int dif1, dif2;
  char *heroes;
  str() {
    x = y = z = dif1 = dif2 = 0;
    heroes = NULL;
  }
  str(const int &x, const int &y, const int &z, const int &dif1,
      const int &dif2) {
    this->x = x;
    this->y = y;
    this->z = z;
    this->dif1 = dif1;
    this->dif2 = dif2;
    heroes = NULL;
  }
};
vector<str> H[MOD];
int a[NMax][4];
int st[NMax];
const char *ansnames = "aLMW";
bool existaSol = false;
int ans[4];
char ansHeroes[200];
int GetHash(int x, int y) { return abs(1LL * x * X + 1LL * y * Y) % MOD; }
void Insert(int dif1, int dif2, int x, int y, int z, char *nowheroes) {
  int cod = GetHash(dif1, dif2);
  for (vector<str>::iterator it = H[cod].begin(); it != H[cod].end(); ++it) {
    if (it->dif1 == dif1 && it->dif2 == dif2) {
      if (x > it->x) {
        it->x = x;
        it->y = y;
        it->z = z;
        delete it->heroes;
        int lg = strlen(nowheroes + 1);
        it->heroes = new char[lg + 3];
        strcpy(it->heroes + 1, nowheroes + 1);
      }
      return;
    }
  }
  str aux(x, y, z, dif1, dif2);
  int lg = strlen(nowheroes + 1);
  aux.heroes = new char[lg + 3];
  strcpy(aux.heroes + 1, nowheroes + 1);
  H[cod].push_back(aux);
}
void back(const int &k, const int &N, const int &offset) {
  if (k == N + 1) {
    char nowheroes[200];
    int index = 0;
    int v[4];
    v[0] = v[1] = v[2] = v[3] = 0;
    for (int i = 1; i <= N; ++i) {
      for (int j = 1; j <= 3; ++j) {
        if (j == st[i]) {
          continue;
        } else {
          nowheroes[++index] = ansnames[j];
          v[j] += a[i][j];
        }
      }
      nowheroes[++index] = '\n';
    }
    nowheroes[index + 1] = 0;
    int dif1 = v[2] - v[1];
    int dif2 = v[3] - v[1];
    Insert(dif1, dif2, v[1], v[2], v[3], nowheroes);
    return;
  }
  for (int i = 1; i <= 3; ++i) {
    st[k] = i;
    back(k + 1, N, offset);
  }
}
void Search(int dif1, int dif2, int x, int y, int z, char *nowheroes) {
  int cod = GetHash(dif1, dif2);
  for (vector<str>::iterator it = H[cod].begin(); it != H[cod].end(); ++it) {
    if (it->dif1 == dif1 && it->dif2 == dif2) {
      existaSol = true;
      if (it->x + x > ans[1]) {
        ans[1] = it->x + x;
        ans[2] = it->y + y;
        ans[3] = it->z + z;
        strcpy(ansHeroes + 1, it->heroes + 1);
        strcat(ansHeroes + 1, nowheroes + 1);
      }
      return;
    }
  }
}
void back2(const int &k, const int &N, const int &offset) {
  if (k == N + 1) {
    char nowheroes[200];
    int index = 0;
    int v[4];
    v[0] = v[1] = v[2] = v[3] = 0;
    for (int i = 1 + offset; i <= N + offset; ++i) {
      for (int j = 1; j <= 3; ++j) {
        if (j == st[i - offset]) {
          continue;
        } else {
          nowheroes[++index] = ansnames[j];
          v[j] += a[i][j];
        }
      }
      nowheroes[++index] = '\n';
    }
    nowheroes[index + 1] = 0;
    int dif1 = v[2] - v[1];
    int dif2 = v[3] - v[1];
    dif1 = -dif1;
    dif2 = -dif2;
    Search(dif1, dif2, v[1], v[2], v[3], nowheroes);
    return;
  }
  for (int i = 1; i <= 3; ++i) {
    st[k] = i;
    back2(k + 1, N, offset);
  }
}
int main() {
  ans[0] = ans[1] = ans[2] = ans[3] = -INF;
  cin >> N;
  for (int i = 1; i <= N; ++i) {
    cin >> a[i][1] >> a[i][2] >> a[i][3];
  }
  if (N == 1) {
    int nrz = 0;
    for (int i = 1; i <= 3; ++i)
      if (a[1][i] == 0) {
        ++nrz;
      }
    if (nrz >= 2) {
      int index = 0;
      nrz = 0;
      for (int i = 1; i <= 3; ++i) {
        if (a[1][i] == 0) {
          ++nrz;
          if (nrz <= 2) {
            ansHeroes[++index] = ansnames[i];
          }
        }
      }
      ansHeroes[++index] = '\n';
      cout << ansHeroes + 1;
    } else
      cout << "Impossible\n";
    return 0;
  }
  back(1, N / 2, 0);
  back2(1, N - (N / 2), N / 2);
  if (existaSol) {
    cout << (ansHeroes + 1);
  } else {
    cout << "Impossible\n";
  }
  return 0;
}
