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.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;

public class C {
    
    static class State implements Comparable<State>{
        int val;
        int many;
        
        State(int v , int m) {
            this.val = v;
            this.many = m;
        }

        @Override
        public int compareTo(State o) {
            return o.many - many;
        }
        
    }
    private void solve() throws IOException {
        int n = nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = nextInt();
        Arrays.sort(a);
        
        PriorityQueue<State> pq = new PriorityQueue<C.State>();
        for (int i = 0; i < n;) {
            int j = i;
            int c = 0;
            while (j < n && a[i] == a[j]) {
                j++;
                c++;
            }
            pq.add(new State(a[i] , c));
            i = j;
        }
        int[][] res = new int[n][3];
        int cc = 0;
        while(true) {
            if (pq.size() < 3)
                break;
            State a1 = pq.poll();
            State a2 = pq.poll();
            State a3 = pq.poll();
            
            res[cc][0] = a1.val;
            res[cc][1] = a2.val;
            res[cc++][2] = a3.val;
            
            int rem1 = a1.many;
            rem1--;
            
            if (rem1 > 0)
                pq.add(new State(a1.val , rem1));
            
            int rem2 = a2.many;
            rem2--;
            
            if (rem2 > 0)
                pq.add(new State(a2.val , rem2));
            
            int rem3 = a3.many;
            rem3--;
            
            if (rem3 > 0)
                pq.add(new State(a3.val , rem3));

        }
        
        writer.println(cc);
        writer.flush();
        
        for (int i = 0; i < cc; i++) {
            Arrays.sort(res[i]);
            writer.println(res[i][2] + " " + res[i][1] + " " + res[i][0]);
            writer.flush();
        }
    }

    public static void main(String[] args) {
        new C().run();
    }

    BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter writer;

    public void run() {
        try {
            reader = new BufferedReader(new InputStreamReader(System.in));
            tokenizer = null;
            writer = new PrintWriter(System.out);
            solve();
            reader.close();
            writer.close();
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    BigInteger nextBigInteger() throws IOException {
        return new BigInteger(nextToken());
    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }
}