#include <bits/stdc++.h>
using namespace std;
const int stala = 1594323;
int tab[30][3];
int potegi[15];
int suma[stala][3];
map<pair<int, int>, int> mapka;
vector<string> wektor;
void pre() {
  potegi[0] = 1;
  for (int i = 1; i <= 14; i++) {
    potegi[i] = potegi[i - 1] * 3;
  }
}
void maska(int k) {
  for (int i = 0; i < potegi[k]; i++) {
    int war = i;
    int a = 0, b = 0, c = 0;
    for (int j = k - 1; j >= 0; j--) {
      int nr = war / potegi[j];
      war -= nr * potegi[j];
      if (nr == 0) {
        a += tab[j][0];
        b += tab[j][1];
      } else if (nr == 1) {
        a += tab[j][0];
        c += tab[j][2];
      } else {
        b += tab[j][1];
        c += tab[j][2];
      }
    }
    suma[i][0] = a;
    suma[i][1] = b;
    suma[i][2] = c;
    if (mapka[{a - b, a - c}] != 0) {
      int index = mapka[{a - b, a - c}] - 1;
      if (suma[index][0] + suma[index][1] + suma[index][2] < a + b + c) {
        mapka[{a - b, a - c}] = i + 1;
      }
    } else {
      mapka[{a - b, a - c}] = i + 1;
    }
  }
}
int maska1 = 0, maska2 = 0, res = -1e9;
void f(int pocz, int kon) {
  for (int i = 0; i < potegi[kon - pocz]; i++) {
    int war = i;
    int a = 0, b = 0, c = 0;
    for (int j = kon - pocz - 1; j >= 0; j--) {
      int nr = war / potegi[j];
      war -= nr * potegi[j];
      if (nr == 0) {
        a += tab[j + pocz][0];
        b += tab[j + pocz][1];
      } else if (nr == 1) {
        a += tab[j + pocz][0];
        c += tab[j + pocz][2];
      } else {
        b += tab[j + pocz][1];
        c += tab[j + pocz][2];
      }
    }
    int index = mapka[{b - a, c - a}];
    if (index > 0) {
      index--;
      if (suma[index][0] + suma[index][1] + suma[index][2] + a + b + c > res) {
        res = suma[index][0] + suma[index][1] + suma[index][2] + a + b + c;
        maska1 = index;
        maska2 = i;
      }
    }
  }
}
void generuj(int potega_maks, int m) {
  wektor.clear();
  for (int i = potega_maks - 1; i >= 0; i--) {
    int nr = m / potegi[i];
    m -= nr * potegi[i];
    if (nr == 0) {
      wektor.push_back("LM");
    } else if (nr == 1) {
      wektor.push_back("LW");
    } else {
      wektor.push_back("MW");
    }
  }
  for (int i = (int)wektor.size() - 1; i >= 0; i--) {
    cout << wektor[i] << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  pre();
  int ile;
  cin >> ile;
  for (int i = 0; i < ile; i++) {
    int a, b, c;
    cin >> a >> b >> c;
    tab[i][0] = a;
    tab[i][1] = b;
    tab[i][2] = c;
  }
  maska(ile / 2);
  f(ile / 2, ile);
  if (res == -1e9) {
    cout << "Impossible";
  } else {
    generuj(ile / 2, maska1);
    generuj(ile - (ile / 2), maska2);
  }
  return 0;
}
