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.*;
import java.io.*;

public class Main implements Runnable {
		class Ball implements Comparable<Ball>{
                        int size;
                        int cnt;
                        Ball(int b, int cnt){ this.size = b; this.cnt = cnt;}
                        
                        public int compareTo(Ball b){
                               return -(cnt - b.cnt);
                        }
                }
                
	public void solve() throws IOException {
		int N  =  nextInt();
               
                Map<Integer, Integer> map = new TreeMap<>();
                for(int i = 0; i < N; i++){
                        int now = nextInt();
                        if(map.containsKey(now)) map.put(now, map.get(now) + 1);
                        else map.put(now, 1);
                } 
                
                Queue<Ball> q = new PriorityQueue<>();
                for(Map.Entry<Integer, Integer> me : map.entrySet()){
                        q.add(new Ball(me.getKey(), me.getValue()));
                }
                 
                int cntTriplets = 0;
                StringBuilder sb = new StringBuilder();
                
                while(q.size() >= 3){
                        Ball a = q.poll();
                        Ball b = q.poll();
                        Ball c = q.poll();
                        int[] ans = {a.size, b.size, c.size};
                        Arrays.sort(ans);
                        sb.append(ans[2] + " " + ans[1] + " " + ans[0] + "\n");
                        cntTriplets++;
                        if(a.cnt > 1) q.add(new Ball(a.size, a.cnt - 1));
                        if(b.cnt > 1) q.add(new Ball(b.size, b.cnt - 1));
                        if(c.cnt > 1) q.add(new Ball(c.size, c.cnt - 1));
                }
                
                
                System.out.println(cntTriplets);
                System.out.print(sb.toString());
	}

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	//-----------------------------------------------------------
	public static void main(String[] args) {
		new Main().run();
	}

	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			tok = null;
			solve();
			in.close();
		} catch (IOException e) {
			System.exit(0);
		}
	}

	public String nextToken() throws IOException {
		while (tok == null || !tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	BufferedReader in;
	StringTokenizer tok;
}