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.io.*;
import java.util.*;
import java.math.*;

public class C implements Runnable {
	private final boolean useStandardIO = true;
	private final String inFile = ".in";
	private final String outFile = ".out";

	class State implements Comparable<State> {
		int size, cnt;

		State(int size, int cnt) {
			this.size = size;
			this.cnt = cnt;
		}

		@Override
		public int compareTo(State arg0) {
			return arg0.cnt - cnt;
		}
	}

	private void solve() throws IOException {
		PriorityQueue<State> q = new PriorityQueue<C.State>();
		int n = nextInt();
		int[] sz = new int[n];
		Random r = new Random(123);
		for (int i = 0; i < n; ++i) {
			sz[i] = nextInt();
			int t = r.nextInt(i + 1);
			int tmp = sz[i];
			sz[i] = sz[t];
			sz[t] = tmp;
		}
		Arrays.sort(sz);
		int cnt = 0, cur = -1;
		for (int i = 0; i <= n; ++i)
			if (i == 0 || i == n || sz[i] != sz[i - 1]) {
				if (cur != -1) {
					q.add(new State(cur, cnt));
				}
				if (i != n) {
					cnt = 1;
					cur = sz[i];
				}
			} else {
				++cnt;
			}
		List<String> ans = new ArrayList<String>();
		int[] k = new int[3];
		while (q.size() > 2) {
			State s1 = q.poll();
			State s2 = q.poll();
			State s3 = q.poll();

			k[0] = s1.size;
			k[1] = s2.size;
			k[2] = s3.size;
			Arrays.sort(k);
			ans.add(k[2] + " " + k[1] + " " + k[0]);
			s1.cnt--;
			s2.cnt--;
			s3.cnt--;
			if (s1.cnt > 0)
				q.add(s1);
			if (s2.cnt > 0)
				q.add(s2);
			if (s3.cnt > 0)
				q.add(s3);
		}
		writer.println(ans.size());
		for (String s : ans)
			writer.println(s);
	}

	public static void main(String[] args) {
		new Thread(null, new C(), "", 64 * 1024 * 1024).run();
	}

	BufferedReader reader;
	StringTokenizer tokenizer;
	PrintWriter writer;

	public void run() {
		try {
			try {
				Locale.setDefault(Locale.US);
			} catch (Exception e) {
			}
			if (useStandardIO) {
				reader = new BufferedReader(new InputStreamReader(System.in));
				writer = new PrintWriter(System.out);
			} else {
				reader = new BufferedReader(new FileReader(inFile));
				writer = new PrintWriter(new FileWriter(outFile));
			}
			tokenizer = null;
			solve();
			// reader.close();
			writer.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	BigInteger nextBigInteger() throws IOException {
		return new BigInteger(nextToken());
	}

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