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.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.PriorityQueue;
import java.util.Scanner;


public class Main {
    public static void main(String[] args) {
        Scanner r = new Scanner(System.in);
        
        int n = r.nextInt();
        
        int[] a = new int[n];
        for(int i = 0; i < n; i++)
            a[i] = r.nextInt();
        
        HashMap<Integer, Integer> m = new HashMap<Integer, Integer>();
        for(int i = 0; i < n; i++){
            if(m.containsKey(a[i])){
                m.put(a[i], m.get(a[i]) + 1);
            }else{
                m.put(a[i], 1);
            }
        }
        
        PriorityQueue<P> pq = new PriorityQueue<P>();
        for(int i : m.keySet())
            pq.add(new P(i, m.get(i)));
        
        
        ArrayList<G> done = new ArrayList<G>();
        while(pq.size() >= 3){
            P p1 = pq.poll();
            P p2 = pq.poll();
            P p3 = pq.poll();
            
            int[] t = new int[]{p1.i, p2.i, p3.i};
            Arrays.sort(t);
            done.add(new G(t[2], t[1], t[0]));
            
            p1.c--;
            p2.c--;
            p3.c--;
            
            if(p1.c > 0)pq.add(p1);
            if(p2.c > 0)pq.add(p2);
            if(p3.c > 0)pq.add(p3);
        }
        
        System.out.println(done.size());
        for(G g : done)
            System.out.printf("%d %d %d\n", g.i, g.j, g.k);
    }
}
class P implements Comparable<P>{
    int i, c;   
    public P(int ii, int ci){
        i = ii;
        c = ci;
    }
    @Override
    public int compareTo(P b) {
        if(c > b.c)return -1;
        else return 1;
    } 
}
class G{
    int i, j, k;
    public G(int ii, int ji, int ki){
        i = ii;
        j = ji;
        k = ki;
    }
}