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;
const int block_size = 320;
const long long mod = 1e9 + 7;
const long long inf = 1e9 + 7;
const long double eps = 1e-9;
const double PI = atan(1) * 4;
template <typename T>
inline int sign(const T &a) {
  if (a < 0) return -1;
  if (a > 0) return 1;
  return 0;
}
template <typename T, typename S>
inline bool upmin(T &a, const S &b) {
  return a > b ? a = b, 1 : 0;
}
template <typename T, typename S>
inline bool upmax(T &a, const S &b) {
  return a < b ? a = b, 1 : 0;
}
template <typename T>
inline void in(T &x) {
  x = 0;
  T f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  x *= f;
}
long long twop(int x) { return 1LL << x; }
template <typename A, typename B>
inline void in(A &x, B &y) {
  in(x);
  in(y);
}
template <typename A, typename B, typename C>
inline void in(A &x, B &y, C &z) {
  in(x);
  in(y);
  in(z);
}
template <typename A, typename B, typename C, typename D>
inline void in(A &x, B &y, C &z, D &d) {
  in(x);
  in(y);
  in(z);
  in(d);
}
int n, m, yyy, yyyy;
int l[100010], r[100010];
int main() {
  int n;
  in(n);
  vector<tuple<int, int, int>> ans;
  map<int, int> cnt;
  for (long long i = 0; i < n; i++) {
    int c;
    in(c);
    cnt[c]++;
  }
  priority_queue<pair<int, int>> pq;
  for (auto i : cnt) {
    pq.push(make_pair(i.second, i.first));
  }
  while (((int)pq.size()) >= 3) {
    auto a = pq.top();
    pq.pop();
    auto b = pq.top();
    pq.pop();
    auto c = pq.top();
    pq.pop();
    vector<int> tmp = {a.second, b.second, c.second};
    sort(tmp.begin(), tmp.end(), greater<int>());
    ans.push_back(make_tuple(tmp[0], tmp[1], tmp[2]));
    a.first--;
    b.first--, c.first--;
    if (a.first) pq.push(a);
    if (b.first) pq.push(b);
    if (c.first) pq.push(c);
  }
  cout << ((int)ans.size()) << endl;
  for (auto i : ans) {
    cout << get<0>(i) << " " << get<1>(i) << " " << get<2>(i) << endl;
  }
  return 0;
}