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 A[(int)1e5 + 5];
map<int, int> M;
long long Alo[(int)1e5 + 5];
int main() {
  int n;
  cin >> n;
  vector<int> V;
  set<pair<int, int> > ST;
  for (int i = 0; i < n; i++) {
    cin >> A[i];
    M[A[i]]++;
  }
  for (int i = 0; i < n; i++) {
    ST.insert(make_pair(-M[A[i]], A[i]));
  }
  vector<pair<int, pair<int, int> > > V2;
  set<pair<int, int> >::iterator it = ST.begin(), it2, it3;
  while (ST.size() > 2) {
    it = ST.begin();
    it2 = it, it3 = it2;
    it2++;
    it3++;
    it3++;
    pair<int, int> K[3] = {*it, *it2, *it3};
    if (!(K[0].first)) {
      ST.erase(it);
      continue;
    }
    if (!K[1].first) {
      ST.erase(it2);
      continue;
    }
    if (!K[2].first) {
      ST.erase(it3);
      continue;
    }
    ST.erase(it);
    ST.erase(it2);
    ST.erase(it3);
    ST.insert(make_pair(K[0].first + 1, K[0].second));
    ST.insert(make_pair(K[1].first + 1, K[1].second));
    ST.insert(make_pair(K[2].first + 1, K[2].second));
    int B[3] = {K[0].second, K[1].second, K[2].second};
    sort(B, B + 3);
    V2.push_back(make_pair(B[2], make_pair(B[1], B[0])));
  }
  cout << V2.size() << endl;
  for (int i = 0; i < V2.size(); i++)
    cout << V2[i].first << ' ' << V2[i].second.first << ' '
         << V2[i].second.second << endl;
}