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.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.StringTokenizer;



public class C100P3 {

    private static BufferedReader in;
    private static PrintWriter out;
    private static StringTokenizer input;
    
    public static void main(String[] args) throws IOException {
        //-------------------------------------------------------------------------
        //Initializing...
        new C100P3();
        //-------------------------------------------------------------------------
        //put your code here... :)
        int n = nextInt();
        int [] num = new int [n] ;
        for (int i = 0; i < num.length; i++) {
            num[i]=nextInt();
        }
        Arrays.sort(num);
        PriorityQueue<temp> a = new PriorityQueue<temp>();
        for (int i = 0; i < num.length; i++) {
            int count=0;
            for (int j = i; j < num.length; j++) {
                if(num[i]!=num[j])break;
                count++;
            }
            a.add(new temp(num[i], count));
            i+=count-1;
        }
        int [][] ret = new int[n][3];
        int place=0;
        while(a.size()>2){
            temp a1= a.poll();ret[place][0]=a1.v;a1.c--;
            temp a2= a.poll();ret[place][1]=a2.v;a2.c--;
            temp a3= a.poll();ret[place++][2]=a3.v;a3.c--;
            if(a1.c!=0)a.add(a1);
            if(a2.c!=0)a.add(a2);
            if(a3.c!=0)a.add(a3);
        }
        writeln(place+"");
        for (int i = 0; i < place; i++) {
            Arrays.sort(ret[i]);
            writeln(ret[i][2]+" "+ret[i][1]+" "+ret[i][0]);
        }
        
        //-------------------------------------------------------------------------
        //closing up
        end();
        //--------------------------------------------------------------------------

    }
    public C100P3() throws IOException {
        //Input Output for Console to be used for trying the test samples of the problem 
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        //-------------------------------------------------------------------------
        //Initalize Stringtokenizer input
        input = new StringTokenizer(in.readLine());
    }

    private static int nextInt() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return Integer.parseInt(input.nextToken());
    }
    private static long nextLong() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return Long.parseLong(input.nextToken());
    }
    private static double nextDouble() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return Double.parseDouble(input.nextToken());
    }
    private static String nextString() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return input.nextToken();
    }
    private static void write(String output){
        out.write(output);
        out.flush();
    }
    private static void writeln(String output){
        out.write(output+"\n");
        out.flush();
    }
    private static void end() throws IOException{
        in.close();
        out.close();
        System.exit(0);
    }

    

}
class temp implements Comparable<temp>{
    
    int v;
    int c;
    
    public temp(int v, int c) {
        super();
        this.v = v;
        this.c = c;
    }

    @Override
    public int compareTo(temp o) {
        // TODO Auto-generated method stub
        return o.c-c;
    }
    
}
