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);
		
		Map<Integer, Integer> M = new HashMap<Integer, Integer>();
		for (int i = 0; i < N; ++i)
			if (M.containsKey(R[i]))
				M.put(R[i], M.get(R[i]) + 1);
			else
				M.put(R[i], 1);
		
		int sz = M.size();
		if (sz < 3)
			print(0);
		Integer [] U = M.values().toArray(new Integer[sz]);
		Arrays.sort(U);		
		int M1 = U[sz-1], M2 = U[sz-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];
		int c = 0, b = 0;
		for (int m : M.keySet()) {
			int z = Math.min(M.get(m), C);
			for (int i = 0; i < z && b < 3; ++i) {
				B[c++][b] = m;
				if (c == C) {
					c = 0; ++b;
				}
			}
		}
				
		print2(C);
		for (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();
	}
}