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;
template <typename TYPE>
void readint(TYPE& x) {
  x = 0;
  int f = 1;
  char c;
  for (c = getchar(); !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - '0';
  x *= f;
}
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
}
template <typename... T>
void rd(T&... args) {
  ((cin >> args), ...);
}
template <typename... T>
void ps(T... args) {
  ((cout << args << ' '), ...);
  cout << '\n';
}
const long long MOD = 1e9 + 7, MOD1 = 998244353LL, MAX = 1e5 + 5;
const char nl = '\n';
const int INF = 2e9;
int n;
long long x, y;
void solve() {
  map<long long, long long> m;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> x;
    m[x]++;
  }
  set<pair<long long, long long>> s;
  for (auto it : m) {
    s.insert({it.second, it.first});
  }
  vector<pair<pair<long long, long long>, long long>> v;
  while (s.size() >= 3) {
    long long x1, x2, y1, y2, z1, z2;
    auto xd = s.end();
    xd--;
    x1 = (*xd).first, x2 = (*xd).second;
    s.erase(xd);
    xd = s.end();
    xd--;
    y1 = (*xd).first, y2 = (*xd).second;
    s.erase(xd);
    xd = s.end();
    xd--;
    z1 = (*xd).first, z2 = (*xd).second;
    s.erase(xd);
    if (x1 >= 2) s.insert({--x1, x2});
    if (y1 >= 2) s.insert({--y1, y2});
    if (z1 >= 2) s.insert({--z1, z2});
    long long mx = max(x2, max(y2, z2)), mn = min(x2, min(y2, z2)),
              md = x2 + y2 + z2 - mn - mx;
    v.push_back({{mx, md}, mn});
  }
  cout << v.size() << '\n';
  for (auto it : v)
    cout << it.first.first << ' ' << it.first.second << ' ' << it.second
         << '\n';
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  solve();
  return 0;
}