In the game Lizard Era: Beginning the protagonist will travel with three companions: Lynn, Meliana and Worrigan. Overall the game has n mandatory quests. To perform each of them, you need to take exactly two companions.

The attitude of each of the companions to the hero is an integer. Initially, the attitude of each of them to the hero of neutral and equal to 0. As the hero completes quests, he makes actions that change the attitude of the companions, whom he took to perform this task, in positive or negative direction.

Tell us what companions the hero needs to choose to make their attitude equal after completing all the quests. If this can be done in several ways, choose the one in which the value of resulting attitude is greatest possible.

Input

The first line contains positive integer n (1 ≤ n ≤ 25) — the number of important tasks. 

Next n lines contain the descriptions of the tasks — the i-th line contains three integers li, mi, wi — the values by which the attitude of Lynn, Meliana and Worrigan respectively will change towards the hero if the hero takes them on the i-th task. All the numbers in the input are integers and do not exceed 107 in absolute value.

Output

If there is no solution, print in the first line "Impossible".

Otherwise, print n lines, two characters is each line — in the i-th line print the first letters of the companions' names that hero should take to complete the i-th task ('L' for Lynn, 'M' for Meliana, 'W' for Worrigan). Print the letters in any order, if there are multiple solutions, print any of them.

Examples

Input

3
1 0 0
0 1 0
0 0 1


Output

LM
MW
MW


Input

7
0 8 9
5 9 -2
6 -8 -7
9 4 5
-4 -9 9
-4 5 2
-6 8 -7


Output

LM
MW
LM
LW
MW
LM
LW


Input

2
1 0 0
1 1 0


Output

Impossible
import java.util.*;
/*
25
2997942 -3148824 -1934609
-118823 4572239 -2224728
3204287 8870631 4456100
-7290680 8827243 1274574
5494361 6879584 5162114
9975076 2855554 3645316
-5887623 -8918313 -5732803
-1061533 -7605261 4966053
-245623 9920487 -7112107
-1205057 -109412 5293911
-3422579 -8712532 1284733
8253977 4785631 3280799
-5547530 -9994910 532588
-143502 7822181 5241828
5094050 8572690 9727828
-6887397 2279223 -7601086
5490161 8709524 -7072918
2666102 351860 -3149124
8397519 -5189213 6927349
-4 5 2
-6 8 -7
1 0 0
0 1 0
0 0 1
1 0 0
 */
public class F {
	static long mult = (long)(1e9);
	
	public static void main(String[] args) {
		
		Scanner qwe = new Scanner(System.in);
		
		int n = qwe.nextInt();
		
		int[][] qs = new int[n][3];
		
		for (int i = 0; i < qs.length; i++) {
			for (int j = 0; j < qs[0].length; j++) {
				qs[i][j] = qwe.nextInt();
			}
		}
		
		int numfront = n/2;
		ArrayDeque<state> dq = new ArrayDeque<state>();
		dq.add(new state(new long[]{0,0,0},0));
		
		
		for (int i = 0; i < numfront; i++) {
			
			ArrayDeque<state> next = new ArrayDeque<state>();
			
			while(!dq.isEmpty()){
				state cur = dq.poll();
				for (int j = 0; j < 3; j++) {
					cur.data[j] = cur.data[j]+qs[i][j];
				}
				
				for (int j = 0; j < 3; j++) {
					cur.data[j] -= qs[i][j];
					long tmoves = cur.moves;
					tmoves= tmoves*3+j;  
					next.add(new state(Arrays.copyOf(cur.data, cur.data.length),tmoves));
					cur.data[j] += qs[i][j];
				}
				
			}
			
			dq = next;
			
		}
		
		HashMap<Long,pos> hm = new HashMap<Long, pos>();
		
		while(!dq.isEmpty()){
			state at = dq.poll();
			pos p = new pos(at.data[0],at.data[1],at.data[2],at.moves);
			
			//System.out.println("first ps: " + p + " dlt: " + p.dlt);
			
			long hash = p.hash();
			if(!hm.containsKey(hash)){
				hm.put(hash, p);
			}
			else{
				pos cont = hm.get(hash);
				if(p.dlt > cont.dlt) hm.put(hash, p);
			}
		}
		
		
		
		dq = new ArrayDeque<state>();
		dq.add(new state(new long[]{0,0,0},0));
		
		for (int i = numfront; i < n; i++) {
			
			ArrayDeque<state> next = new ArrayDeque<state>();
			
			while(!dq.isEmpty()){
				state cur = dq.poll();
				for (int j = 0; j < 3; j++) {
					cur.data[j] = cur.data[j]+qs[i][j];
				}
				
				for (int j = 0; j < 3; j++) {
					cur.data[j] -= qs[i][j];
					long tmoves = cur.moves;
					tmoves= tmoves*3+j;  
					next.add(new state(Arrays.copyOf(cur.data, cur.data.length),tmoves));
					cur.data[j] += qs[i][j];
				}
				
			}
			
			dq = next;
			
		}
		long best = (long)(-1e9);
		long bm1 = 0;
		long bm2 = 0;
		while(!dq.isEmpty()){
			state at = dq.poll();
			pos p = new pos(at.data[0],at.data[1],at.data[2],at.moves);
			pos look = new pos(0,-p.x,-p.y,at.moves);
			
			long hash = look.hash();
			if(hm.containsKey(hash)){
				pos o = hm.get(hash);
				if(best < p.dlt+o.dlt){
					best = p.dlt+o.dlt;
					
					//System.out.println("p dlt " + p.dlt + " o.dlt: " + o.dlt + " numfront: " + numfront);
					//System.out.println("P: " + p);
					//System.out.println("O: " + o);
					
					bm1 = o.moves;
					bm2 = p.moves;
				}
				
			}
			
		}
		
		String[] guys = new String[]{"MW","LW","LM"};
		
		if(best == (long)(-1e9)) System.out.println("Impossible");
		else{
			
			//System.out.println("best: " + best);
			
			ArrayList<String> toprint = new ArrayList<String>();
			
			for(int i = 0;  i < n-numfront; i++){
				toprint.add(guys[(int)(bm2%3)]);
				bm2 /= 3;
			}
			
			for(int i = 0;  i < numfront; i++){
				toprint.add(guys[(int)(bm1%3)]);
				bm1 /= 3;
			}
			
			for (int i = 0; i < toprint.size(); i++) {
				System.out.println(toprint.get(toprint.size()-1-i));
			}
			
		}
		
		
		qwe.close();
	}
	
	static class state{
		long[] data;
		long moves;
		
		public state(long[] data, long moves){
			this.data = data;
			this.moves= moves;
		}
		
	}
	
	
	static class pos{
		long x, y, dlt;
		long moves;
		public pos(long a, long b, long c, long moves){
			dlt = a;
			x = b-dlt;
			y = c - dlt;
			this.moves = moves;
		}
		
		
		public String toString(){
			return (dlt)+", "+(x+dlt)+", "+(y+dlt);
		}
		
		public long hash(){
			return x*mult+y;
		}
		
	}
	

}
