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 CR100A {

    // static Scanner in;
    static StreamTokenizer st;
    static int n;
    static int[] c;
    static PrintWriter out;
    public static void main(String[] args) throws IOException {
        // in = new Scanner(System.in);
        st = new StreamTokenizer(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        n = nextInt();
        c = new int[n];
        tmp = new int[n];
        for (int i = 0; i < n; ++i)
            c[i] = nextInt();
        Arrays.sort(c);
        int l = 0, r = n;
        while (r - l > 1) {
            int m = (l + r) >> 1;
            if (may(m))
                l = m;
            else
                r = m;
        }
        out.println(l);
        if (l == 0) {
            out.close();
            return;
        }
        int[] x, y, z;
        x = new int[l];
        y = new int[l];
        z = new int[l];
        for (int i = 0; i < l; ++i)
            x[i] = c[i];
        int cc = 0;
        int i = 0;
        for (i = l; i < n; ++i) {
            if (c[i] > x[cc]) {
                y[cc++] = c[i];
            }
            if (cc == l) {
                ++i;
                break;
            }
        }
        cc = 0;
        for (; i < n; ++i) {
            if (c[i] > y[cc]) {
                z[cc++] = c[i];
            }
            if (cc == l)
                break;
        }
        for (i = 0; i < l; ++i) {
            out.println(z[i] + " " + y[i] + " " + x[i]);
        }
        out.close();
    }

    static int[] tmp;

    private static boolean may(int m) {
        int i = 0;
        for (i = 0; i < m; ++i)
            tmp[i] = c[i];
        int j, l = 0;
        for (j = i; j < n; ++j) {
            if (c[j] > tmp[l]) {
                tmp[l++] = c[j];
            }
            if (l == m)
                break;
        }
        ++j;
        if (l != m)
            return false;
        l = 0;
        for (i = j; i < n; ++i) {
            if (c[i] > tmp[l]) {
                ++l;
            }
            if (l == m)
                break;
        }
        if (l != m)
            return false;
        return true;
    }

    private static int nextInt() throws IOException {
        st.nextToken();
        return (int) st.nval;
    }
}