#include <bits/stdc++.h>
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  std::cerr << name << " : " << arg1 << "\n";
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  std::cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
std::pair<int, int> operator+(std::pair<int, int> a, std::pair<int, int> b) {
  return {a.first + b.first, a.second + b.second};
}
std::pair<long long, long long> operator+(std::pair<long long, long long> a,
                                          std::pair<long long, long long> b) {
  return {a.first + b.first, a.second + b.second};
}
std::ostream& operator<<(std::ostream& out, std::pair<int, int> a) {
  out << a.first << " " << a.second << "\n";
  return out;
}
std::ostream& operator<<(std::ostream& out, std::pair<long long, long long> a) {
  out << a.first << " " << a.second << "\n";
  return out;
}
std::istream& operator>>(std::istream& in, std::pair<int, int>& a) {
  in >> a.first >> a.second;
  return in;
}
std::istream& operator>>(std::istream& in, std::pair<long long, long long>& a) {
  in >> a.first >> a.second;
  return in;
}
using namespace std;
long long power(int a, int b) {
  long long int ans = 1;
  for (int i = 0; i < b; ++i) {
    ans *= a;
  }
  return ans;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  int l[n], m[n], w[n];
  for (int i = 0; i < n; ++i) {
    cin >> l[i] >> m[i] >> w[i];
  }
  if (n == 1) {
    if (l[0] == 0 && w[0] == 0) {
      cout << "LW";
    } else if (l[0] == 0 && m[0] == 0) {
      cout << "LM";
    } else if (m[0] == 0 && w[0] == 0) {
      cout << "MW";
    } else {
      cout << "Impossible";
    }
    return 0;
  }
  int l1[n / 2], m1[n / 2], w1[n / 2];
  int l2[n - n / 2], m2[n - n / 2], w2[n - n / 2];
  for (int i = 0; i < n; ++i) {
    if (i < n / 2) {
      l1[i] = l[i];
      m1[i] = m[i];
      w1[i] = w[i];
    } else {
      l2[i - n / 2] = l[i];
      m2[i - n / 2] = m[i];
      w2[i - n / 2] = w[i];
    }
  }
  map<std::pair<int, int>, std::pair<int, int> > conf1, conf2;
  for (int i = 0; i < power(3, n / 2); ++i) {
    int t = i;
    int ly = 0, me = 0, wo = 0;
    for (int k = 0; k < n / 2; ++k) {
      if (t % 3 == 0) {
        ly += l1[k];
        me += m1[k];
      } else if (t % 3 == 1) {
        ly += l1[k];
        wo += w1[k];
      } else {
        wo += w1[k];
        me += m1[k];
      }
      t = t / 3;
    }
    me -= ly;
    wo -= ly;
    if (conf1.count(make_pair(me, wo)) == 0)
      conf1[make_pair(me, wo)] = {ly, i};
    else {
      if (conf1[make_pair(me, wo)].first < ly) {
        conf1[make_pair(me, wo)] = {ly, i};
      }
    }
  }
  for (int i = 0; i < power(3, n - n / 2); ++i) {
    int t = i;
    int ly = 0, me = 0, wo = 0;
    for (int k = 0; k < n - n / 2; ++k) {
      if (t % 3 == 0) {
        ly += l2[k];
        me += m2[k];
      } else if (t % 3 == 1) {
        ly += l2[k];
        wo += w2[k];
      } else {
        wo += w2[k];
        me += m2[k];
      }
      t /= 3;
    }
    me -= ly;
    wo -= ly;
    if (conf2.count(make_pair(me, wo)) == 0)
      conf2[make_pair(me, wo)] = {ly, i};
    else {
      if (conf2[make_pair(me, wo)].first < ly) {
        conf2[make_pair(me, wo)] = {ly, i};
      }
    }
  }
  int ans = (-2) * 1000000007;
  int config1 = -1, config2 = -1;
  for (auto& i : conf1) {
    if (conf2.count(make_pair(-i.first.first, -i.first.second)) != 0) {
      int x = conf1[i.first].first +
              conf2[make_pair(-i.first.first, -i.first.second)].first;
      if (x > ans) {
        ans = x;
        config1 = conf1[i.first].second;
        config2 = conf2[make_pair(-i.first.first, -i.first.second)].second;
      }
    }
  }
  if (ans == (-2 * 1000000007))
    cout << "Impossible";
  else {
    for (int i = 0; i < n / 2; ++i) {
      if (config1 % 3 == 0) {
        cout << "LM"
             << "\n";
      } else if (config1 % 3 == 1) {
        cout << "LW"
             << "\n";
      } else
        cout << "MW"
             << "\n";
      config1 /= 3;
    }
    for (int i = 0; i < n - n / 2; ++i) {
      if (config2 % 3 == 0) {
        cout << "LM"
             << "\n";
      } else if (config2 % 3 == 1) {
        cout << "LW"
             << "\n";
      } else
        cout << "MW"
             << "\n";
      config2 /= 3;
    }
  }
}
