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 x, y, ind;
  char ch;
};
const long long mod = 1000000007;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long fact[13];
void factorial() {
  fact[0] = 1;
  for (long long i = 1; i < 12; i++) fact[i] = (fact[i - 1] * i);
}
bool cmp(point A, point B) {
  if (A.x != B.x) return A.x < B.x;
  return A.y < B.y;
}
vector<long long> sie;
long long spf[10000007 + 7];
void sieve() {
  for (long long i = 2; i < 10000007; i++) {
    if (spf[i] == 0) {
      spf[i] = i;
      sie.push_back(i);
    }
    for (long long j = 0; j < ((long long)(sie).size()) &&
                          i * sie[j] <= 10000007 && sie[j] <= spf[i];
         j++)
      spf[i * sie[j]] = sie[j];
  }
}
const long long mx = 100007;
long long n, ans, _1, _2, an, bigans, m, _, _3;
long long ar[mx], nr[mx], cover[mx];
priority_queue<pair<long long, long long> > ss;
map<long long, long long> mm;
vector<long long> anp;
bool isItValid(long long x) {
  long long to = 0;
  for (auto a : mm) to += min(x, a.second);
  to /= 3;
  if (to >= x) return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << setprecision(12);
  cin >> n;
  long long lo = 1, hi = 0;
  for (long long i = 0; i < n; i++) {
    cin >> ar[i];
    mm[ar[i]]++;
    hi += ar[i];
  }
  while (hi - lo > 5) {
    long long mid = (hi + lo) >> 1;
    if (isItValid(mid))
      lo = mid;
    else
      hi = mid;
  }
  for (long long i = lo; i < hi + 1; i++)
    if (isItValid(i)) _ = max(_, i);
  cout << _ << "\n";
  for (auto a : mm) {
    _1 = min(_, a.second);
    while (_1--) anp.push_back(a.first);
  }
  sort((anp).begin(), (anp).end());
  for (long long i = 0; i < _; i++) {
    cout << anp[i + _ + _] << " ";
    cout << anp[i + _] << " ";
    cout << anp[i] << "\n";
  }
  return 0;
}