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.awt.color.*;
import java.util.*;
import java.awt.Point;
import java.math.*;
import java.io.*;
@SuppressWarnings("unused")
public class implementation {int[] b;	String g="";int c=0;int M=1000000000+7;ArrayList<Integer> list=new ArrayList<Integer>();String s;int[] size;int[] id;
int[]ab;int[] data;int mod=100000;LinkedList<Integer> queue=new LinkedList<Integer>();int dis=0;int max=0;ArrayList<Integer>[] arr;
	public static void main(String[] args)  {
                new implementation().solve();
                                  }
	long[] fact;long[] inv;
            public void solve(){
            	int n=sc.nextInt();
            	PriorityQueue<Node> pq=new PriorityQueue<Node>(n+100,new sortbyweight());
            	PriorityQueue<Node> qq=new PriorityQueue<Node>(n+100,new sortbyweight());
            	HashMap<Integer,Integer> map=new HashMap<Integer,Integer>();
            	for(int i=0;i<n;i++) {
            		int a=sc.nextInt();
            		if(map.get(a)==null) {
            			map.put(a, 1);
            		}
            		else {
            			map.put(a, map.get(a)+1);
            		}
            	}
            	
            	for (Map.Entry<Integer, Integer> entry : map.entrySet()) {
            		
            		Node b=new Node(entry.getKey(),entry.getValue());
            		pq.add(b);
            		qq.add(b);
            	}
            	if(pq.size()<3) {
            		System.out.println(0);
            		
            	}
            	else {
            	StringBuilder sb=new StringBuilder();
            	Node p,q,r;int c=0;
            	while(true){
            		p=pq.poll();q=pq.poll();r=pq.poll();
            		if(p.color<1||r.color<1||q.color<1)
            			break;
            		
            		Node g=new Node(p.x,p.color-1);Node g2=new Node(q.x,q.color-1);Node g3=new Node(r.x,r.color-1);
            		pq.add(g);pq.add(g2);pq.add(g3);
            		
            		 c++;
            	}
            	System.out.println(c);
            	
            	while(true){
            		p=qq.poll();q=qq.poll();r=qq.poll();
            		if(p.color<1||r.color<1||q.color<1)
            			break;
            		int yy=Math.max(p.x, Math.max(q.x, r.x));
            		int rr=Math.min(p.x, Math.min(r.x, q.x));
            		int uu=p.x+q.x+r.x-yy-rr;
            		System.out.println(yy+" "+uu+" "+rr);
            		Node g=new Node(p.x,p.color-1);Node g2=new Node(q.x,q.color-1);Node g3=new Node(r.x,r.color-1);
            		qq.add(g);qq.add(g2);qq.add(g3);
            		
            		 
            	}
            	
            			}
            		
            		
            }
            		
            public class Node{
       	     int x;int color;int y;
       	       Node par;
       	        public Node(int a,int b) {
       	          	x=a;color=b;
       		
       	             }
                         }
                     class sortbyweight implements Comparator<Node>{

       				@Override
       				public int compare(Node a, Node b) {
       					// TODO Auto-generated method stub
       					
       					if(a.color<b.color)
                			return 1;
                		else 
                			return -1;
       				}}
       				
       				 FastReader sc=new FastReader();
       				 static class FastReader
       				     {
       				         BufferedReader br;
       				         StringTokenizer st;
       				  
       				         public FastReader()
       				         {
       				             br = new BufferedReader(new
       				                      InputStreamReader(System.in));
       				         }
       				  
       				         String next()
       				         {
       				             while (st == null || !st.hasMoreElements())
       				             {
       				                 try
       				                 {
       				                     st = new StringTokenizer(br.readLine());
       				                 }
       				                 catch (IOException  e)
       				                 {
       				                     e.printStackTrace();
       				                 }
       				             }
       				             return st.nextToken();
       				         }
       				  
       				         int nextInt()
       				         {
       				             return Integer.parseInt(next());
       				         }
       				  
       				         long nextLong()
       				         {
       				             return Long.parseLong(next());
       				         }
       				  
       				         double nextDouble()
       				         {
       				             return Double.parseDouble(next());
       				         }
       				  
       				         String nextLine()
       				         {
       				             String str = "";
       				             try
       				             {
       				                 str = br.readLine();
       				             }
       				             catch (IOException e)
       				             {
       				                 e.printStackTrace();
       				             }
       				             return str;
       				         }
       				     }}