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;
long long n;
vector<long long> a(100500);
map<long long, deque<long long> > freq;
map<long long, deque<long long> >::iterator ii;
set<pair<long long, long long> > f;
set<pair<long long, long long> >::reverse_iterator jj;
struct triple {
  long long little, middle, hard;
};
vector<triple> answer;
int main() {
  cin >> n;
  long long i, j;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    freq[a[i]].push_back(i);
  }
  for (ii = freq.begin(); ii != freq.end(); ii++) {
    deque<long long> rez = ii->second;
    pair<long long, long long> temp = make_pair(rez.size(), ii->first);
    f.insert(temp);
  }
  long long ans = 0;
  while (f.size() > 2) {
    jj = f.rbegin();
    pair<long long, long long> one = (*jj);
    f.erase(one);
    jj = f.rbegin();
    pair<long long, long long> two = (*jj);
    f.erase(two);
    jj = f.rbegin();
    pair<long long, long long> three = (*jj);
    f.erase(three);
    vector<pair<long long, long long> > temp;
    temp.push_back(make_pair(one.second, freq[one.second][0]));
    temp.push_back(make_pair(two.second, freq[two.second][0]));
    temp.push_back(make_pair(three.second, freq[three.second][0]));
    freq[one.second].pop_front();
    freq[two.second].pop_front();
    freq[three.second].pop_front();
    sort(temp.begin(), temp.end());
    triple rez;
    rez.little = temp[0].first;
    rez.middle = temp[1].first;
    rez.hard = temp[2].first;
    answer.push_back(rez);
    if (freq[one.second].size() > 0)
      f.insert(make_pair(freq[one.second].size(), one.second));
    if (freq[two.second].size() > 0)
      f.insert(make_pair(freq[two.second].size(), two.second));
    if (freq[three.second].size() > 0)
      f.insert(make_pair(freq[three.second].size(), three.second));
    ans++;
  }
  cout << ans << endl;
  for (i = 0; i < answer.size(); i++) {
    cout << answer[i].hard << " " << answer[i].middle << " " << answer[i].little
         << endl;
  }
  return 0;
}