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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
struct point {
  int index, num;
  friend bool operator<(point a, point b) {
    if (a.num < b.num) return true;
    return false;
  }
};
priority_queue<point> que;
int a[150000], b[150000][3];
bool pop(point &p) {
  if (que.empty()) return false;
  p = que.top();
  que.pop();
  return true;
}
void push(point &p) {
  if (p.num == 0) return;
  que.push(p);
}
int max(int x, int y) {
  if (x > y) return x;
  return y;
}
int min(int x, int y) {
  if (x < y) return x;
  return y;
}
void dog(int &x, int &y, int &z) {
  int t1, t2, t3;
  t1 = x;
  t2 = y;
  t3 = z;
  x = max(max(t1, t2), t3);
  z = min(min(t1, t2), t3);
  if (t1 != x && t1 != z) y = t1;
  if (t2 != x && t2 != z) y = t2;
  if (t3 != x && t3 != z) y = t3;
}
int main() {
  point pt, p1, p2, p3;
  int n, i, tot, t1;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + 1 + n);
  while (!que.empty()) que.pop();
  t1 = 1;
  for (i = 2; i <= n; i++)
    if (a[i] != a[i - 1]) {
      pt.index = a[i - 1];
      pt.num = t1;
      t1 = 1;
      que.push(pt);
    } else
      t1++;
  pt.index = a[n];
  pt.num = t1;
  que.push(pt);
  tot = 0;
  while (1) {
    if (!pop(p1)) break;
    if (!pop(p2)) break;
    if (!pop(p3)) break;
    {
      tot++;
      b[tot][0] = p1.index;
      b[tot][1] = p2.index;
      b[tot][2] = p3.index;
      dog(b[tot][0], b[tot][1], b[tot][2]);
    }
    p1.num = p1.num - 1;
    p2.num = p2.num - 1;
    p3.num--;
    push(p1);
    push(p2);
    push(p3);
  }
  printf("%d\n", tot);
  for (i = 1; i <= tot; i++) printf("%d %d %d\n", b[i][0], b[i][1], b[i][2]);
  return 0;
}