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 [] R) {
		t = millis();
		Arrays.sort(R);
		
		int [] Q = new int [N];
		
		Q[0] = 1;
		int Z = 1;
		for (int i = 1; i < N; ++i)
			if (R[i] == R[i-1]) {
				Q[i] = Q[i-1]+1;
				Q[i-1] = -1;
			} else {
				Q[i] = 1;
				++Z;
			}

		if (Z < 3)
			print(0);
		
		int [] U = new int [Z];
		for (int i = 0, j = 0; i < N; ++i)
			if (Q[i] != -1)
				U[j++] = Q[i];
		
		int [] V = new int [Z];
		for (int i = 0; i < Z; ++i)
			V[i] = U[i];
		
		Arrays.sort(V);
		int M1 = V[Z-1], M2 = V[Z-2];
		
		int M3 = N - M1 - M2;
		int C = Math.min(M3, (M3+M2)/2);
		C = Math.min(C, N/3);
		
		if (C == 0)
			print(0);
		
		int [][] B = new int[C][3];
		for (int i = 0, k = 0, c = 0, b = 0; i < Z; ++i)
			for (int j = 0; j < U[i] && b < 3; ++j, ++k)
				if (j < C) {
					B[c][b] = R[k];
					++c;
					if (c == C) {
						c = 0; ++b;
					}
				}
				
		print2(C);
		for (int c = 0; c < C; ++c) {
			Arrays.sort(B[c]);
			print2(B[c][2] + " " + B[c][1] + " " + B[c][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();
	}
}