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.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.Arrays;

public class C implements Runnable {

    public 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 );
        int l = 0;
        int r = a.length / 3;
        while ( l < r ) {
            int m = ( l + r + 1 ) / 2;
            if ( can( m, a ) != null ) {
                l = m;
            } else {
                r = m - 1;
            }
        }
        int[][] res = can( l, a );
        out.println( l );
        if ( res != null ) {
            for ( int[] s : res ) {
                out.println( s[2] + " " + s[1] + " " + s[0] );
            }
        }
    }

    private int[][] can( int m, int[] a ) {
        int[][] r = new int[m][3];
        int last = 0;
        int cnt = 0;
        int row = 0;
        int pos = 0;
        for ( int x : a ) {
            if ( x == last ) {
                cnt ++;
            } else {
                last = x;
                cnt = 1;
            }
            if ( cnt > m ) {
                continue;
            }
            r[pos][row] = x;
            pos ++;
            if ( pos >= m ) {
                row ++;
                pos = 0;
            }
            if ( row >= 3 ) {
                break;
            }
        }
        if ( row >= 3 ) {
            return r;
        } else {
            return null;
        }
    }

    public StreamTokenizer in;

    public PrintWriter out;

    C() throws IOException {
        in = new StreamTokenizer( new InputStreamReader( System.in ) );
        out = new PrintWriter(System.out);
    }

    int nextInt() throws IOException {
        in.nextToken();
        return ( int ) in.nval;
    }

    void check(boolean f, String msg) {
        if (!f) {
            out.close();
            throw new RuntimeException(msg);
        }
    }

    void close() throws IOException {
        out.close();
    }

    public void run() {
        try {
            solve();
            close();
        } catch (Exception e) {
            e.printStackTrace(out);
            out.flush();
            throw new RuntimeException(e);
        }
    }

    public static void main(String[] args) throws IOException {
        new Thread(new C()).start();
    }
}