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;
namespace fastIO {
bool IOerror = 0;
inline char nc() {
  static char buf[100000], *p1 = buf + 100000, *pend = buf + 100000;
  if (p1 == pend) {
    p1 = buf;
    pend = buf + fread(buf, 1, 100000, stdin);
    if (pend == p1) {
      IOerror = 1;
      return -1;
    }
  }
  return *p1++;
}
inline bool blank(char ch) {
  return ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t';
}
inline long long read() {
  bool sign = 0;
  char ch = nc();
  long long x = 0;
  for (; blank(ch); ch = nc())
    ;
  if (IOerror) return 0;
  if (ch == '-') sign = 1, ch = nc();
  for (; ch >= '0' && ch <= '9'; ch = nc()) x = x * 10 + ch - '0';
  if (sign) x = -x;
  return x;
}
};  // namespace fastIO
using namespace fastIO;
long long ans = 0;
vector<long long> a[1000010];
map<long long, long long> num;
set<pair<long long, long long> > s;
signed main() {
  long long n = read();
  for (long long i = 1; i <= n; i++) {
    long long x = read();
    num[x]++;
  }
  for (auto i : num) {
    s.insert(make_pair(i.second, i.first));
  }
  while (s.size() >= 3) {
    pair<long long, long long> m1 = *--s.end(), m2 = *-- --s.end(),
                               m3 = *-- -- --s.end();
    ans++;
    a[ans].push_back(m1.second), a[ans].push_back(m2.second),
        a[ans].push_back(m3.second);
    sort(a[ans].begin(), a[ans].end());
    s.erase(m1);
    s.erase(m2);
    s.erase(m3);
    if (m1.first != 1) s.insert(make_pair(m1.first - 1, m1.second));
    if (m2.first != 1) s.insert(make_pair(m2.first - 1, m2.second));
    if (m3.first != 1) s.insert(make_pair(m3.first - 1, m3.second));
  }
  cout << ans << '\n';
  for (long long i = 1; i <= ans; i++) {
    cout << a[i][2] << " " << a[i][1] << ' ' << a[i][0] << "\n";
  }
  return 0;
}