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;
const int maxn = 1e5 + 10;
struct node {
  int x, num;
  node() {}
  node(int _x, int _num) { x = _x, num = _num; }
  bool operator<(const node& b) const { return num < b.num; }
};
int val[maxn], num[maxn];
int ans[maxn][3];
map<int, int> mp;
priority_queue<node> pq;
int main() {
  int dif = 0;
  int n, m;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &val[i]);
    if (!mp[val[i]]) {
      mp[val[i]] = 1;
      num[dif++] = val[i];
    } else
      mp[val[i]]++;
  }
  for (int i = 0; i < dif; i++) {
    pq.push(node(num[i], mp[num[i]]));
  }
  int now = 0, j = 0;
  while (pq.size() >= 3) {
    node tmp1 = pq.top();
    pq.pop();
    node tmp2 = pq.top();
    pq.pop();
    node tmp3 = pq.top();
    pq.pop();
    ans[now][0] = tmp1.x, tmp1.num--;
    ans[now][1] = tmp2.x, tmp2.num--;
    ans[now][2] = tmp3.x, tmp3.num--;
    now++;
    if (tmp1.num) pq.push(tmp1);
    if (tmp2.num) pq.push(tmp2);
    if (tmp3.num) pq.push(tmp3);
  }
  printf("%d\n", now);
  for (int i = 0; i < now; i++) {
    int a = ans[i][0], b = ans[i][1], c = ans[i][2];
    if (a > b) swap(a, b);
    if (a > c) swap(a, c);
    if (b > c) swap(b, c);
    printf("%d %d %d\n", c, b, a);
  }
  return 0;
}