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.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;

@SuppressWarnings("unchecked")
public class C_New_Year_Snowmen {
    static class Snow implements Comparable{
        private int r;
        private int cnt;
        public int getR() {
            return r;
        }
        public void setR(int r) {
            this.r = r;
        }
        public int getCnt() {
            return cnt;
        }
        public void setCnt(int cnt) {
            this.cnt = cnt;
        }
        public Snow(int r){
            this.r=r;
            this.cnt=1;
        }
        public int compareTo(Object o) {
            // TODO Auto-generated method stub
            Snow s = (Snow)o;
            int res;
            if(this.cnt==s.getCnt()){
                res = s.r-this.r;
            }else{
                res = s.cnt-this.cnt;
            }
            return res;
        }
    }
    /**
     * 2012-1-8
     * @author froest
     * @param args
     * @throws IOException 
     */
    public static void main(String[] args) throws IOException {
        // TODO Auto-generated method stub
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int i;
        int a[][] = new int[40000][3];
        TreeSet<Snow> set = new TreeSet<Snow>();
        TreeMap<Integer,Snow> tree = new TreeMap<Integer,Snow>();
        
        for(i = 0; i < n; i++){
            int temp = scan.nextInt();
            if(!tree.containsKey(temp)){
                tree.put(temp, new Snow(temp));
            }else{
                Snow ns = tree.get(temp);
                ns.setCnt(ns.getCnt()+1);
                tree.put(temp, ns);
            }
        }
        
        Set se = tree.keySet();
        for (Object object : se) {
            Integer ii = (Integer)object;
            set.add(tree.get(ii));
        }
        //long start = System.currentTimeMillis();
        int k = 0;
        List<Integer> b = new ArrayList<Integer>();
        Snow snow[] = new Snow[3];
        while(set.size()>=3){
            for(int j = 0; j < 3; j++){
                snow[j] = set.pollFirst();
                b.add(snow[j].r);
                snow[j].setCnt(snow[j].getCnt()-1);
            }
            
            for(int j = 0; j < 3; j++){
                if(snow[j].getCnt()==0){
                    continue;
                }
                set.add(snow[j]);
            }
            Collections.sort(b);
            for(int j = 0; j < 3; j++){
                a[k][j] = b.get(2-j);
            }
            b.clear();
            k++;
        }
        System.out.println(k);
        for (int j = 0; j < k; j++) {
            System.out.println(a[j][0]+" "+a[j][1]+" "+a[j][2]);
        }
        //System.out.println(System.currentTimeMillis()-start);
    }
}