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.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.StringTokenizer;

public class ProblemC {
    public static void main(String[] args) {
        InputReader in = new InputReader();
        PrintWriter out = new PrintWriter(System.out);

        new ProblemC().solve(in, out);

        out.close();
    }

    public void solve(InputReader in, PrintWriter out) {
        int n = in.nextInt();

        int[] r = new int[n];
        for (int i = 0; i < n; i++) {
            r[i] = in.nextInt();
        }

        Map<Integer, Integer> index = new HashMap<Integer, Integer>();
        final int[] perRadius = new int[n];
        int sizeCount = 0;
        for (int i = 0; i < n; i++) {
            if (!index.containsKey(r[i])) {
                r[sizeCount] = r[i];
                index.put(r[i], sizeCount++);
            }

            perRadius[index.get(r[i])]++;
        }

        Queue<Integer> queue = new PriorityQueue<Integer>(sizeCount, new Comparator<Integer>() {
            public int compare(Integer o1, Integer o2) {
                return perRadius[o2] - perRadius[o1];
            }
        });

        for (int i = 0; i < sizeCount; i++) {
            queue.add(i);
        }

        int answer = 0;
        int[][] result = new int[n / 3][3];

        while (queue.size() > 2) {
            for (int j = 0; j < 3; j++) {
                result[answer][j] = queue.poll();
            }

            for (int i : result[answer]) {
                if (--perRadius[i] != 0) {
                    queue.add(i);
                }
            }

            for (int j = 0; j < 3; j++) {
                result[answer][j] = r[result[answer][j]];
            }

            Arrays.sort(result[answer]);

            answer++;
        }

        out.println(answer);
        for (int i = 0; i < answer; i++) {
            out.println(result[i][2] + " " + result[i][1] + " " + result[i][0]);
        }
    }

    static class InputReader {
        public BufferedReader br;
        public StringTokenizer st;

        public InputReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}