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
import java.util.Map.Entry;

import java.util.*;
import java.io.*;

import static java.lang.Math.*;

public class Main {

    BufferedReader in;
    StringTokenizer st;
    PrintWriter out;

    static class Pair implements Comparable<Pair> {
        int cnt, value;

        public Pair(int cnt, int value) {
            super();
            this.cnt = cnt;
            this.value = value;
        }

        @Override
        public int compareTo(Pair o) {
            if (cnt != o.cnt)
                return cnt - o.cnt;
            return value - o.value;
        }

    }

    int sz;
    Pair[] v;

    Pair getNext() {
        if (sz < 0)
            return null;
        Pair ret = v[sz];
        --sz;
        return ret;
    }

    Pair process(Pair p) {
        p.cnt--;
        if (p.cnt <= 0)
            return getNext();
        return p;
    }

    void solve() throws IOException {
        int n = ni();
        HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
        for (int i = 0; i < n; ++i) {
            int a = ni();
            if (map.containsKey(a) == false)
                map.put(a, 0);
            map.put(a, map.get(a) + 1);
        }
        TreeSet<Pair> set = new TreeSet<Main.Pair>();

        for (Entry<Integer, Integer> e : map.entrySet())
            set.add(new Pair(e.getValue(), e.getKey()));
        StringBuilder ret = new StringBuilder();
        int cnt = 0;
        int[] tSort = new int[3];

        while (set.size() >= 3) {
            Pair p1 = set.pollLast();
            Pair p2 = set.pollLast();
            Pair p3 = set.pollLast();

            ++cnt;
            tSort[0] = p1.value;
            tSort[1] = p2.value;
            tSort[2] = p3.value;
            Arrays.sort(tSort);
            ret.append(tSort[2] + " " + tSort[1] + " " + tSort[0] + "\n");

            add(p1, set);
            add(p2, set);
            add(p3, set);
        }

        out.println(cnt);
        out.println(ret);
    }

    void add(Pair p, TreeSet<Pair> set) {
        --p.cnt;
        if (p.cnt > 0)
            set.add(p);
    }

    public Main() throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        in.close();
        out.close();
    }

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

    int ni() throws IOException {
        return Integer.valueOf(ns());
    }

    long nl() throws IOException {
        return Long.valueOf(ns());
    }

    double nd() throws IOException {
        return Double.valueOf(ns());
    }

    public static void main(String[] args) throws IOException {
        new Main();
    }
}
