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

import java.util.*;
import java.util.Map.Entry;
import java.lang.*;
import java.io.*;
import java.math.BigInteger;


public class CF {
	private static FS sc = new FS();
	
	private static class FS {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());				               
	            } catch (IOException e) {}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}
	
	private static class extra {
		
		static int[] intArr(int size) {
			int[] a = new int[size];
			for(int i = 0; i < size; i++) a[i] = sc.nextInt();
			return a;
		}
		
		static long[] longArr(int size) {
			long[] a = new long[size];
			for(int i = 0; i < size; i++) a[i] = sc.nextLong();
			return a;
		}
		
		static long intSum(int[] a) {
			long sum = 0; 
			for(int i = 0; i < a.length; i++) {
				sum += a[i];
			}
			return sum;
		}
		
		static long longSum(long[] a) {
			long sum = 0; 
			for(int i = 0; i < a.length; i++) {
				sum += a[i];
			}
			return sum;
		}
		
		static LinkedList[] graphD(int vertices, int edges) {
			LinkedList<Integer>[] temp = new LinkedList[vertices+1];
			for(int i = 0; i <= vertices; i++) temp[i] = new LinkedList<>();
			for(int i = 0; i < edges; i++) {
				int x = sc.nextInt();
				int y = sc.nextInt();
				temp[x].add(y);
			}
			return temp;
		}
		
		static LinkedList[] graphUD(int vertices, int edges) {
			LinkedList<Integer>[] temp = new LinkedList[vertices+1];
			for(int i = 0; i <= vertices; i++) temp[i] = new LinkedList<>();
			for(int i = 0; i < edges; i++) {
				int x = sc.nextInt();
				int y = sc.nextInt();
				temp[x].add(y);
				temp[y].add(x);
			}
			return temp;
		}
		
		static void printG(LinkedList[] temp) {
			for(LinkedList<Integer> aa:temp) System.out.println(aa);
		}
		
	}
	
	static LinkedList<Integer>[] temp;
	static int mod = (int)Math.pow(10, 9) + 7;
	static int maxSize = (int) 2e5 + 100;
	
	static class pair {
		int val;
		int c;
		pair(int x, int y) {
			val = x;
			c = y;
		}
	}
	
	public static void main(String[] args) {
//		int t = sc.nextInt();
		int t = 1;
		StringBuilder ret = new StringBuilder();
		while(t-- > 0) {
			int n = sc.nextInt();
			int[] a = extra.intArr(n);
			PriorityQueue<pair> pq = new PriorityQueue<>((pair o1, pair o2) -> o2.c - o1.c);
			HashMap<Integer, Integer> map = new HashMap<>();
			for(int aa:a) map.put(aa, map.getOrDefault(aa, 0)+1);
			for(int aa:map.keySet()) pq.add(new pair(aa, map.get(aa)));
			StringBuilder out = new StringBuilder();
//			for(pair aa:pq) System.out.println(aa.val + " " + aa.c);
			long ans = 0;
			while(pq.size() > 2) {
				pair o1 = pq.poll();
				pair o2 = pq.poll();
				pair o3 = pq.poll();
//				System.out.println(o3.c);
				ans++;
				o2.c--;
				o1.c--;
				o3.c--;
				int[] arr = {o1.val, o2.val, o3.val};
				Arrays.sort(arr);
				out.append(arr[2] + " " + arr[1] + " " + arr[0] + "\n");
				if(o1.c > 0) pq.add(new pair(o1.val, o1.c));
				if(o2.c > 0) pq.add(new pair(o2.val, o2.c));
				if(o3.c > 0) pq.add(new pair(o3.val, o3.c));
			}
			ret.append(ans + "\n" + out);
 		}
		System.out.println(ret);	
	}
}