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;
signed long long int d[100000 + 5], tak[100000 + 5];
vector<signed long long int> fre[100000 + 5];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> d[i];
  }
  sort(d + 1, d + n + 1);
  for (int i = 1; i <= n;) {
    int j = i + 1;
    for (; j <= n && d[j] == d[i]; ++j)
      ;
    fre[j - i].push_back(d[i]);
    i = j;
  }
  int f = n, s = n, t = n;
  vector<signed long long int> f1, s1, t1;
  while (t > 0 && f > 0 && s > 0) {
    if (fre[f].size() == 0) {
      f--;
      continue;
    }
    if (fre[s].size() == 0 or f == s && fre[s].size() < 2 or f < s) {
      s--;
      continue;
    }
    if (fre[t].size() == 0 or t == s && fre[t].size() < 2 or
        f == s && s == t && fre[t].size() < 3 or s < t) {
      t--;
      continue;
    }
    f1.push_back(fre[f].back());
    signed long long int p1 = fre[f].back();
    fre[f].pop_back();
    s1.push_back(fre[s].back());
    signed long long int p2 = fre[s].back();
    fre[s].pop_back();
    t1.push_back(fre[t].back());
    signed long long int p3 = fre[t].back();
    fre[t].pop_back();
    if (f >= 1) fre[f - 1].push_back(p1);
    if (s >= 1) fre[s - 1].push_back(p2);
    if (t >= 1) fre[t - 1].push_back(p3);
  }
  int k = f1.size();
  cout << k << endl;
  signed long long int p[5];
  for (int i = 1; i <= k; ++i) {
    p[1] = f1[i - 1];
    p[2] = s1[i - 1];
    p[3] = t1[i - 1];
    sort(p + 1, p + 3 + 1);
    cout << p[3] << ' ' << p[2] << ' ' << p[1] << endl;
  }
}