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:
// AC as of 5/1/2018
// Problem link: http://codeforces.com/contest/140/problem/C
// Solution: Be greedy. Count the quantities of each snowball radius, and greedily build snowmen from the three largest quantities.
//           Implementation:
//           1. Store quantities in a HashMap with KV pair (radius, quantity)
//           2. Convert KV pairs to objects with comparator for sorting in descending order, and push these objects into a priority queue
//           3. While there are >= 3 quantities left, 

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.PriorityQueue;

public class CF140C {
	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		int nBalls = Integer.parseInt(br.readLine());
//		int nBalls = 100000;
		HashMap<Integer, Integer> map = new HashMap<>();
		String[] split = br.readLine().split(" ");
		for(int i=0; i<nBalls; i++) {
			int r = Integer.parseInt(split[i]);
			if(map.containsKey(r)) map.put(r, map.get(r)+1);
			else map.put(r, 1);
//			map.put(i+1, 1);
		}
		PriorityQueue<Quantity> quantities = new PriorityQueue<>();
		for(int c : map.keySet()) quantities.add(new Quantity(c, map.get(c)));	
		ArrayList<Snowman> snowmen = new ArrayList<>();
		while(quantities.size()>=3) {
			Quantity q1 = quantities.poll();
			Quantity q2 = quantities.poll();
			Quantity q3 = quantities.poll();
			snowmen.add(new Snowman(q1.r, q2.r, q3.r));
			q1.count--;
			q2.count--;
			q3.count--;
			if(q1.count>=1) quantities.add(q1);
			if(q2.count>=1) quantities.add(q2);
			if(q3.count>=1) quantities.add(q3);
		}
		sb.append(snowmen.size()).append("\n");
		for(int i=0; i<snowmen.size(); i++) sb.append(snowmen.get(i)).append("\n");
		System.out.print(sb);
	}
	
	static class Quantity implements Comparable<Quantity> {
		int r;
		int count;
		
		public Quantity(int r, int count) {
			this.r = r;
			this.count = count;
		}

		@Override
		public int compareTo(Quantity o) {
			return Integer.compare(o.count, this.count);
		}
	}
	
	static class Snowman {
		int[] stack;
		
		public Snowman(int a, int b, int c) {
			stack = new int[3];
			stack[0] = a;
			stack[1] = b;
			stack[2] = c;
			Arrays.sort(stack);
		}
		
		public String toString() {
			return stack[2]+" "+stack[1]+" "+stack[0];
		}
	}
}