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 sun.reflect.generics.tree.Tree;

import java.io.*;
import static java.lang.Math.*;

import java.lang.reflect.Array;
import java.util.*;
import java.util.function.*;
import java.lang.*;

public class Main {
    final static String fileName = "";
    final static boolean useFiles = false;

    public static void main(String[] args) throws FileNotFoundException {
        InputStream inputStream;
        OutputStream outputStream;
        if (useFiles) {
            inputStream = new FileInputStream(fileName + ".in");
            outputStream = new FileOutputStream(fileName + ".out");
        } else {
            inputStream = System.in;
            outputStream = System.out;
        }
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task(in, out);
        solver.solve();
        out.close();
    }
}

class SnowMan{
    int[] a;
    int t = 0;
    SnowMan(int... a){
        Arrays.sort(a);
        this.a = a;
    }
    void print(PrintWriter out){
        for (int i = 2; i >= 0; i--){
            out.print(a[i] + " ");
        }
        out.println();
    }
}

class Item implements Comparable<Item> {
    Item(int count, int value){
        Count = count;
        Value = value;
    }
    int Count, Value;

    @Override
    public int compareTo(Item o) {
        return Count - o.Count == 0 ? Value - o.Value : Count - o.Count;
    }
}

class Task {
    public void solve() {
        int n = in.nextInt();
        TreeMap<Integer, Integer> map = new TreeMap<>();
        for (int i = 0; i < n; i++) {
            int x = in.nextInt();
            Integer value = map.get(x);
            map.put(x, value == null ? 1 : value + 1);
        }
        TreeSet<Item> set = new TreeSet<>();
        for (Integer key : map.keySet()) {
            set.add(new Item(map.get(key), key));
        }
//        for (Item i : set){
//            out.println(i.Count + " "+i.Value);
//        }
        List<SnowMan> result = new ArrayList<>();
        while (set.size() >= 3) {
            Item first = set.last();
            set.remove(first);
            Item second = set.last();
            set.remove(second);
            Item third = set.last();
            set.remove(third);

            first.Count--;
            second.Count--;
            third.Count--;

            if (first.Count != 0)
                set.add(first);
            if (second.Count != 0)
                set.add(second);
            if (third.Count != 0)
                set.add(third);

            result.add(new SnowMan(first.Value, second.Value, third.Value));
        }
        out.println(result.size());
        for (SnowMan man : result) {
            man.print(out);
        }
    }

    private InputReader in;
    private PrintWriter out;

    Task(InputReader in, PrintWriter out) {
        this.in = in;
        this.out = out;
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

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

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

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

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

    public byte nextByte(){
        return Byte.parseByte(next());
    }
}