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;
template <class T>
T inline sqr(T x) {
  return x * x;
}
template <class T>
inline void relaxMin(T &a, T b) {
  a = min(a, b);
}
template <class T>
inline void relaxMax(T &a, T b) {
  a = max(a, b);
}
template <class T>
inline T sign(T x) {
  return x > 0 ? 1 : (x < 0 ? -1 : 0);
}
template <class T>
inline T myAbs(T a) {
  return a > 0 ? a : -a;
}
template <class T>
string str(T i) {
  stringstream ss;
  ss << i;
  return ss.str();
}
string str(int i) {
  char s[100];
  sprintf(s, "%d", i);
  return string(s);
}
template <class T>
string str(T begin, T end) {
  stringstream ss;
  ss << "[";
  int f = 0;
  while (begin != end) ss << (f ? ", " : "") << *begin++, f = 1;
  ss << "]";
  return ss.str();
}
template <class T>
string str(int n, T begin) {
  return str(begin, begin + n);
}
void err(const char *fmt, ...) {
  va_list list;
  va_start(list, fmt);
  vfprintf(stderr, fmt, list);
  fflush(stderr);
}
void Assert(bool f, const char *fmt, ...) {
  if (!f) {
    va_list list;
    va_start(list, fmt);
    vfprintf(stderr, fmt, list);
    fflush(stderr);
    exit(1);
  }
}
vector<int> a1, b1, c1;
int n, x;
map<int, int> cnt;
set<pair<int, int> > b;
void add(pair<int, int> p) {
  if (p.first > 1) b.insert(make_pair(p.first - 1, p.second));
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < (int)(n); i++) scanf("%d", &x), cnt[x]++;
  for (__typeof((cnt).begin()) it = (cnt).begin(); it != (cnt).end(); it++)
    b.insert(make_pair(it->second, it->first));
  while ((int)(b).size() >= 3) {
    set<pair<int, int> >::const_reverse_iterator it = b.rbegin();
    pair<int, int> A = *it++;
    pair<int, int> B = *it++;
    pair<int, int> C = *it++;
    int a[] = {A.second, B.second, C.second};
    sort(a, a + 3);
    a1.push_back(a[2]), b1.push_back(a[1]), c1.push_back(a[0]);
    b.erase(A);
    b.erase(B);
    b.erase(C);
    add(A);
    add(B);
    add(C);
  }
  printf("%d\n", (int)(a1).size());
  for (int i = 0; i < (int)((int)(a1).size()); i++)
    printf("%d %d %d\n", a1[i], b1[i], c1[i]);
  return 0;
}