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.util.*;
public class Snowmen {
	public static void main(String[] args){
		Scanner reader = new Scanner(System.in);
		int n = reader.nextInt();
		int[] r = new int[n];
		for(int i = 0; i < n; i++)
			r[i] = reader.nextInt();
		
		Arrays.sort(r);
		PriorityQueue<Pair> q = new PriorityQueue<Pair>();
		
		for(int i = 0; i < n; i++){
			int k = i+1;
			while(k < n && r[i]==r[k]) k++;
			q.add(new Pair(r[i], k-i));
			i = k-1;
		}
		
		int cnt = 0;
		LinkedList<Integer> out = new LinkedList<Integer>();
		
		while(q.size() > 2){
			Pair a = q.remove();
			Pair b = q.remove();
			Pair c = q.remove();
			
			int min = 1;
//			int min = Math.min(a.f, Math.min(b.f, c.f));
			for(int i = 0; i < min; i++)
				add(a,b,c,out);
			
			insert(a,min,q);
			insert(b,min,q);
			insert(c,min,q);
			cnt += min;
		}
		
		System.out.println(cnt);
		for(int i = 0; i < cnt; i++){
			for(int j = 0; j < 3; j++)
				System.out.print(out.remove() + " ");
			System.out.println();
		}
	}
	
	public static void add(Pair a, Pair b, Pair c, LinkedList<Integer> sol){
		int[] ret = new int[]{a.v, b.v, c.v};
		Arrays.sort(ret);
		sol.add(ret[2]);
		sol.add(ret[1]);
		sol.add(ret[0]);
	}
	
	public static void insert(Pair p, int d, PriorityQueue<Pair> q){
		p.f-=d;
		if(p.f == 0)
			return;	
		q.add(p);
	}
	
	public static class Pair implements Comparable<Pair>{
		int v,f;
		public Pair(int _v, int _f){
			v = _v;
			f = _f;
		}
		public int compareTo(Pair p){
			return p.f-f;
		}
	}
}