3 5
2 1 608591421 720962564
3 2 608591421 641991574
3 2 718110706 353409763
2 3 482786015 858341723
3 2 825397574 357507279
 2 1
2 1 317425595 636156322
 50000 1
20845 28516 904146168 997637433

Yes
641991574 1
2 
 Yes
0 0

 Yes
0 0


#include <bits/stdc++.h>
using namespace std;
const int max_n = 33, inf = 1111111111;
int n, a[max_n], b[max_n], c[max_n], pw[15], f[max_n];
int ans = -inf, mask1 = -1, mask2 = -1;
map<pair<int, int>, pair<int, int> > m;
void get_f(int mask, int n) {
  for (int i = 0; i < n; ++i) {
    f[i] = mask % 3;
    mask /= 3;
  }
}
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i] >> b[i] >> c[i];
  }
  if (n == 1) {
    int i = 0;
    if (a[i] == 0 && b[i] == 0) {
      cout << "LM" << endl;
    } else if (a[i] == 0 && c[i] == 0) {
      cout << "LW" << endl;
    } else if (b[i] == 0 && c[i] == 0) {
      cout << "MW" << endl;
    } else {
      cout << "Impossible" << endl;
    }
    return 0;
  }
  pw[0] = 1;
  for (int i = 1; i < 15; ++i) {
    pw[i] = pw[i - 1] * 3;
  }
  int x = (n + 1) / 2;
  int y = n - x;
  for (int mask = 0; mask < pw[y]; ++mask) {
    get_f(mask, y);
    int q = 0, w = 0, e = 0;
    for (int i = x; i < n; ++i) {
      int qq, ww, ee;
      if (f[i - x] == 0) {
        qq = a[i];
        ww = b[i];
        ee = 0;
      } else if (f[i - x] == 1) {
        qq = a[i];
        ww = 0;
        ee = c[i];
      } else {
        qq = 0;
        ww = b[i];
        ee = c[i];
      }
      q += qq;
      w += ww;
      e += ee;
    }
    int dw = w - q;
    int de = e - q;
    if (!m.count(make_pair(dw, de))) {
      m[make_pair(dw, de)] = make_pair(q, mask);
    } else {
      int res = m[make_pair(dw, de)].first;
      if (res < q) {
        m[make_pair(dw, de)] = make_pair(q, mask);
      }
    }
  }
  for (int mask = 0; mask < pw[x]; ++mask) {
    get_f(mask, x);
    int q = 0, w = 0, e = 0;
    for (int i = 0; i < x; ++i) {
      int qq, ww, ee;
      if (f[i] == 0) {
        qq = a[i];
        ww = b[i];
        ee = 0;
      } else if (f[i] == 1) {
        qq = a[i];
        ww = 0;
        ee = c[i];
      } else {
        qq = 0;
        ww = b[i];
        ee = c[i];
      }
      q += qq;
      w += ww;
      e += ee;
    }
    int dw = q - w;
    int de = q - e;
    if (m.count(make_pair(dw, de))) {
      pair<int, int> p = m[make_pair(dw, de)];
      q += p.first;
      if (ans < q) {
        ans = q;
        mask1 = mask;
        mask2 = p.second;
      }
    }
  }
  if (ans == -inf) {
    cout << "Impossible" << endl;
    return 0;
  }
  get_f(mask1, x);
  for (int i = 0; i < x; ++i) {
    if (f[i] == 0) {
      cout << "LM" << endl;
    } else if (f[i] == 1) {
      cout << "LW" << endl;
    } else {
      cout << "MW" << endl;
    }
  }
  get_f(mask2, y);
  for (int i = 0; i < y; ++i) {
    if (f[i] == 0) {
      cout << "LM" << endl;
    } else if (f[i] == 1) {
      cout << "LW" << endl;
    } else {
      cout << "MW" << endl;
    }
  }
  return 0;
}
