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.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
    static BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); 
    public static void main(String[] args) throws Exception {
        int n1 = Integer.parseInt(in.readLine());
        int [] l1 = new int[n1];
        
        StringTokenizer in2 = new StringTokenizer(in.readLine());
        for (int i = 0; i< n1;i++){
            int k1 = Integer.parseInt(in2.nextToken());
            l1[i]= k1;
        }
        
        int[][] counts = sortedUnique(l1);
        PriorityQueue<Integer> q = new PriorityQueue(counts[0].length, new C1(counts));
        for (int i =0; i < counts[0].length; i++){
            q.add(i);
        }
        long ans = 0;
        StringBuilder fin = new StringBuilder();
        int[] cache = {1,1,1};
        for (;;){
            if (q.size() <3){
                break;
            }
            int x1 = q.poll();
            int x2 = q.poll();
            int x3 = q.poll();
            
            int v = 1;
            ans += 1;
            cache[0] = counts[0][x1];
            cache[1] = counts[0][x2];
            cache[2] = counts[0][x3];
            Arrays.sort(cache);
            fin.append(cache[2]+" "+cache[1]+" "+cache[0]+"\n");
            counts[1][x1] -= 1;
            counts[1][x2] -= 1;
            counts[1][x3] -= 1;
            if (counts[1][x1]>0) q.add(x1);
            if (counts[1][x2]>0) q.add(x2);
            if (counts[1][x3]>0) q.add(x3);
            //System.out.println(q);
        }
        System.out.println(ans);
        System.out.println(fin);
    }
    
    static int min(int a, int b){
        if (a <=b)return a;
        return b;
    }
    static class C1 implements Comparator<Integer>{
        int[][] dat = null;
        public C1(int[][] k1){
            dat = k1;
        }
        @Override
        public int compare(Integer o1, Integer o2) {
            int k1 = o1;
            int k2 = o2;
            return dat[1][k2] - dat[1][k1];
        }
    }
    static int[][] sortedUnique(int[] l1){
        Arrays.sort(l1);
        int size = 0;
        int[] sorted = new int[l1.length];
        int[] count = new int[l1.length];
        for (int i = 0; i < l1.length; i++){
            boolean add = false;
            if (i == 0) add = true;
            else if (l1[i] != l1[i-1]) add = true;
            if (add){
                sorted[size] = l1[i];
                count[size] = 1;
                size++;
            }
            else {
                count[size-1]++;
            }
        }
        int[][] fin = {Arrays.copyOf(sorted, size),Arrays.copyOf(count, size)};
        return fin;
    }
    
    static class CS{
        HashMap<Integer, Integer> m1 = new HashMap<>();
        void add(int n1, int k1){
            int old = 0;
            if (m1.containsKey(n1)){
                old = m1.get(n1);
            }
            old += k1;
            if (old == 0){
                m1.remove(n1);
            }
            else {
                m1.put(n1,old);
            }
        }
        int get(int n1){
            if (m1.containsKey(n1)){
                return m1.get(n1);
            }
            return 0;
        }
    }
}