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<vector<long long> > anp;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << setprecision(12);
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> ar[i];
    mm[ar[i]]++;
  }
  for (auto a : mm) {
    ss.push({a.second, a.first});
  }
  while (ss.size() > 2) {
    pair<long long, long long> a, b, c;
    vector<long long> tmp;
    a = ss.top();
    ss.pop();
    b = ss.top();
    ss.pop();
    c = ss.top();
    ss.pop();
    tmp.push_back(a.second);
    tmp.push_back(b.second);
    tmp.push_back(c.second);
    sort((tmp).begin(), (tmp).end());
    a.first -= 1;
    b.first -= 1;
    c.first -= 1;
    if (a.first > 0) ss.push(a);
    if (b.first > 0) ss.push(b);
    if (c.first > 0) ss.push(c);
    anp.push_back(tmp);
  }
  cout << anp.size() << "\n";
  for (long long i = 0; i < ((long long)(anp).size()); i++) {
    cout << anp[i][2] << " ";
    cout << anp[i][1] << " ";
    cout << anp[i][0] << "\n";
  }
  return 0;
}