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;
int inf = 1000000005;
long long int llinf = 2000000000000000005LL;
long long int mod = 1000000007;
long long int mod9 = 1000000009;
double PI = 3.1415926535897;
double eps = 1e-10;
int dx[] = {1, -1, 0, 0, 1, -1, 1, -1}, dy[] = {0, 0, 1, -1, 1, 1, -1, -1};
vector<bool> isprime;
vector<int> primes;
void seive(int n, bool wantlist = true) {
  isprime.resize(n + 1, true);
  isprime[0] = isprime[1] = false;
  int sq = sqrt(n + 1);
  for (int i = (2); i < (sq + 1); i++) {
    if (isprime[i]) {
      for (int j = i * i; j <= n; j += i) isprime[j] = false;
    }
  }
  for (int i = 2; wantlist && i <= n; i++) {
    if (isprime[i]) primes.push_back(i);
  }
}
bool isitprime(int n) {
  if (n < 2) return false;
  int sq = sqrt(n);
  for (int i = (2); i < (sq + 1); i++)
    if (n % i == 0) return false;
  return true;
}
template <class T>
inline T gcd(T a, T b) {
  while (b != 0) {
    a %= b;
    swap(a, b);
  }
  return a;
}
template <class T>
inline T lcm(T a, T b) {
  return a * b / gcd(a, b);
}
inline long long int bexp(long long int x, long long int n,
                          long long int m = mod) {
  long long int res = 1;
  x %= m;
  while (n) {
    if (n & 1) res = res * x % m;
    x = x * x % m;
    n >>= 1;
  }
  return res;
}
struct D {
  int a, b, c;
};
vector<D> solve(int m, map<int, int> mp) {
  vector<int> a;
  for (pair<int, int> p : mp)
    for (int i = (0); i < (min(p.second, m)); i++) a.push_back(p.first);
  vector<D> res;
  for (int i = 0; i < m; i++) {
    if (i < a.size() && i + m < a.size() && i + 2 * m < a.size())
      res.push_back(D{a[i + 2 * m], a[i + m], a[i]});
    else
      break;
  }
  return res;
}
int main() {
  int n;
  scanf("%d", &n);
  ;
  map<int, int> mp;
  for (int i = (0); i < (n); i++) {
    int r;
    scanf("%d", &r);
    ;
    mp[r]++;
  }
  int l = 0, r = n / 3;
  vector<D> ans;
  while (l <= r) {
    int m = (l + r) / 2;
    vector<D> res = solve(m, mp);
    if (res.size() == m) {
      ans = res;
      l = m + 1;
    } else
      r = m - 1;
  }
  cout << ans.size() << endl;
  for (D d : ans) cout << d.a << " " << d.b << " " << d.c << endl;
}