Problem: As meticulous Gerald sets the table and caring Alexander sends the postcards, Sergey makes snowmen. Each showman should consist of three snowballs: a big one, a medium one and a small one. Sergey's twins help him: they've already made n snowballs with radii equal to r1, r2, ..., rn. To make a snowman, one needs any three snowballs whose radii are pairwise different. For example, the balls with radii 1, 2 and 3 can be used to make a snowman but 2, 2, 3 or 2, 2, 2 cannot. Help Sergey and his twins to determine what maximum number of snowmen they can make from those snowballs.

Input

The first line contains integer n (1 ≤ n ≤ 105) — the number of snowballs. The next line contains n integers — the balls' radii r1, r2, ..., rn (1 ≤ ri ≤ 109). The balls' radii can coincide.

Output

Print on the first line a single number k — the maximum number of the snowmen. Next k lines should contain the snowmen's descriptions. The description of each snowman should consist of three space-separated numbers — the big ball's radius, the medium ball's radius and the small ball's radius. It is allowed to print the snowmen in any order. If there are several solutions, print any of them.

Examples

Input

7
1 2 3 4 5 6 7


Output

2
3 2 1
6 5 4


Input

3
2 2 3


Output

0

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;

public class C {

	public C () throws IOException {
		String input = r.readLine();
		int N = Integer.parseInt(input);
		int [] R = new int [N];
		String [] S = r.readLine().split(" ");
		for (int i = 0; i < N; ++i)
			R[i] = Integer.parseInt(S[i]);
		solve(N, R);
	}
	
	public void solve (int N, int [] RR) {
		t = millis();
		
		Arrays.sort(RR);
		int [] R = new int [N];
		int [] M = new int [N];
		int Z = 0;
		for (int i = 0; i < N; ++i) {
			if (i > 0 && RR[i] != RR[i-1])
				++Z; 
			R[i] = Z;
			M[Z] = RR[i];
		}
		++Z;
		if (Z == 1)
			print(0);
		
		int [] Q = new int [Z];
		for (int i = 0; i < N; ++i)
			++Q[R[i]];
		
		int [] QU = new int [N];
		for (int i = 0; i < Z; ++i)
			++QU[Q[i]];
		
		int [] CU = new int [N];
		int [][] T = new int [N][];
		
		for (int i = 0; i < N; ++i)
			T[i] = new int[QU[i]];
		
		for (int i = 0; i < Z; ++i) {
			int q = Q[i];
			T[q][CU[q]++] = M[i];
		}

		int M1 = -1, M2 = -1;
		for (int i = N-1; i >= 0; --i) {
			if (QU[i] > 0 && M1 == -1) {
				M1 = i;
				if (QU[i] > 1)
					M2 = i;
			}
			else if (QU[i] > 0 && M1 > 0 && M2 == -1)
				M2 = i;
			if (M1 > 0 && M2 > 0)
				break;
		}
				
		int M3 = N - M1 - M2;
		int C = Math.min(M3, (M3+M2)/2);
		C = Math.min(C, N/3);
		
		int [][] B = new int [C][3];
		
		int c = 0, b = 0;
		for (int i = N-1; i > 0; --i)
			for (int j = 0; j < T[i].length; ++j)
				for (int k = 0; k < i && k < C; ++k) {
					if (c < C && b < 3) {
						B[c][b] = T[i][j];
						++c;
						if (c == C) {
							c = 0; ++b;
						}
					}
				}
		
		print2 (C);
		for (int i = 0; i < C; ++i) {
			Arrays.sort(B[i]);
			print2(B[i][2] + " " + B[i][1] + " " + B[i][0]);
		}
	}

	////////////////////////////////////////////////////////////////////////////////////

	static BufferedReader r;
	static long t;
	
	static void print2 (Object o) {
		System.out.println(o);
	}
	
	static void print (Object o) {
		print2(o);
		//print2((millis() - t) / 1000.0);
		System.exit(0);
	}
	
	static void run () throws IOException {
		r = new BufferedReader(new InputStreamReader(System.in));
		new C();
	}
	
	public static void main(String[] args) throws IOException {
		run();
	}
	
	static long millis() {
		return System.currentTimeMillis();
	}
}