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>
const int PI = acos(-1.0);
using namespace std;
const int Max = 10055;
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a * (b / gcd(a, b))); }
bool com(string x, string y) { return x + y < y + x; }
map<int, int> s;
pair<int, int> get_last(set<pair<int, int> >& h) {
  set<pair<int, int> >::iterator ii;
  ii = h.end();
  ii--;
  pair<int, int> y = *ii;
  h.erase(*ii);
  return y;
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    s[x]++;
  }
  set<pair<int, int> > ss;
  map<int, int>::iterator itr = s.begin();
  while (itr != s.end()) {
    pair<int, int> p = (*itr);
    ss.insert(make_pair(p.second, p.first));
    itr++;
  }
  if (ss.size() < 3) return cout << 0, 0;
  vector<int> v;
  while (1) {
    vector<pair<int, int> > m;
    for (int i = 0; i < 3; i++) m.push_back(get_last(ss));
    if (m[2].first < 1) break;
    v.push_back(m[0].second);
    v.push_back(m[1].second);
    v.push_back(m[2].second);
    ss.insert(make_pair(m[0].first - 1, m[0].second));
    ss.insert(make_pair(m[1].first - 1, m[1].second));
    ss.insert(make_pair(m[2].first - 1, m[2].second));
  }
  cout << v.size() / 3 << endl;
  for (int i = 0; i < v.size() - 2; i += 3) {
    int q[3];
    q[0] = v[i];
    q[1] = v[i + 1];
    q[2] = v[i + 2];
    sort(q, q + 3);
    cout << q[2] << " " << q[1] << " " << q[0] << endl;
  }
  return 0;
}