#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC optimize("-O3")
int a[26], b[26], c[26], n, n1, n2, best = -9e8, ans1_a, ans1_b, ans1_c, ans2_a,
                                    ans2_b, ans2_c;
vector<pair<int, pair<int, int> > > A, B;
map<pair<int, int>, pair<pair<int, int>, pair<int, int> > > q;
deque<char> out1, out2;
void rec1(int gone, int x, int y, int z) {
  if (gone == n1) {
    A.push_back({x, {y, z}});
    return;
  }
  rec1(gone + 1, x + a[gone + 1], y + b[gone + 1], z);
  rec1(gone + 1, x + a[gone + 1], y, z + c[gone + 1]);
  rec1(gone + 1, x, y + b[gone + 1], z + c[gone + 1]);
}
void rec2(int gone, int x, int y, int z) {
  if (gone == n) {
    B.push_back({x, {y, z}});
    return;
  }
  rec2(gone + 1, x + a[gone + 1], y + b[gone + 1], z);
  rec2(gone + 1, x + a[gone + 1], y, z + c[gone + 1]);
  rec2(gone + 1, x, y + b[gone + 1], z + c[gone + 1]);
}
void get_ans1(int gone, int x, int y, int z, deque<char>& u) {
  if (gone == n1 && x == ans1_a && y == ans1_b && z == ans1_c) {
    out1 = u;
    return;
  }
  if (gone == n1) {
    return;
  }
  u.push_back('L');
  u.push_back('M');
  get_ans1(gone + 1, x + a[gone + 1], y + b[gone + 1], z, u);
  u.pop_back();
  u.pop_back();
  u.push_back('L');
  u.push_back('W');
  get_ans1(gone + 1, x + a[gone + 1], y, z + c[gone + 1], u);
  u.pop_back();
  u.pop_back();
  u.push_back('M');
  u.push_back('W');
  get_ans1(gone + 1, x, y + b[gone + 1], z + c[gone + 1], u);
  u.pop_back();
  u.pop_back();
}
void get_ans2(int gone, int x, int y, int z, deque<char>& u) {
  if (gone == n && x == ans2_a && y == ans2_b && z == ans2_c) {
    out2 = u;
    return;
  }
  if (gone == n) {
    return;
  }
  u.push_back('L');
  u.push_back('M');
  get_ans2(gone + 1, x + a[gone + 1], y + b[gone + 1], z, u);
  u.pop_back();
  u.pop_back();
  u.push_back('L');
  u.push_back('W');
  get_ans2(gone + 1, x + a[gone + 1], y, z + c[gone + 1], u);
  u.pop_back();
  u.pop_back();
  u.push_back('M');
  u.push_back('W');
  get_ans2(gone + 1, x, y + b[gone + 1], z + c[gone + 1], u);
  u.pop_back();
  u.pop_back();
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  int i, j;
  n1 = n / 2;
  for (i = 1; i <= n; i++) {
    cin >> a[i] >> b[i] >> c[i];
  }
  rec1(0, 0, 0, 0);
  rec2(n1, 0, 0, 0);
  int p = 0;
  for (auto& i : B) {
    p++;
    int x = i.first, y = i.second.first, z = i.second.second,
        cur_m = max({x, y, z});
    pair<pair<int, int>, pair<int, int> > now = q[{y - x, z - y}];
    if (now.first.first == 0) {
      q[{y - x, z - y}] = {{p, x}, {y, z}};
    } else {
      int p = max({now.first.second, now.second.first, now.second.second});
      if (cur_m > p) {
        q[{y - x, z - y}] = {{p, x}, {y, z}};
      }
    }
  }
  for (auto i : A) {
    int x = i.first, y = i.second.first, z = i.second.second, cur_xy = y - x,
        cur_yz = z - y;
    pair<pair<int, int>, pair<int, int> > now = q[{-cur_xy, -cur_yz}];
    if (now.first.first != 0) {
      int get_a = x + now.first.second, get_b = y + now.second.first,
          get_c = z + now.second.second;
      if (get_a > best) {
        best = get_a;
        ans1_a = x;
        ans1_b = y;
        ans1_c = z;
        ans2_a = now.first.second;
        ans2_b = now.second.first;
        ans2_c = now.second.second;
      }
    }
  }
  if (best == -9e8) {
    cout << "Impossible";
    return 0;
  }
  deque<char> p1, p2;
  get_ans1(0, 0, 0, 0, p1);
  get_ans2(n1, 0, 0, 0, p2);
  for (i = 0; i < out1.size(); i++) {
    cout << out1[i];
    if (i % 2 == 1) {
      cout << "\n";
    }
  }
  for (i = 0; i < out2.size(); i++) {
    cout << out2[i];
    if (i % 2 == 1) {
      cout << "\n";
    }
  }
  return 0;
}
