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 JAVA):

Solution:
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.StringTokenizer;
import java.util.TreeMap;
public class cf140c {
  public static void main(String[] args) {
    FastScanner in = new FastScanner(System.in);
    PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    int n = in.nextInt();
    TreeMap<Integer,Integer> map = new TreeMap<Integer,Integer>();
    for(int i=0; i<n; i++) {
      int x = in.nextInt();
      if(!map.containsKey(x)) map.put(x, 1);
      else map.put(x, map.get(x)+1);
    }
    PriorityQueue<Pair> q = new PriorityQueue<Pair>();
    for(Map.Entry<Integer, Integer> e : map.entrySet()) {
      q.add(new Pair(e.getKey(),e.getValue()));
    }
    ArrayList<ArrayList<Integer>> ans = new ArrayList<ArrayList<Integer>>();
    while(q.size() >= 3) {
      Pair[] pairs = new Pair[3];
      for(int i=0; i<3; i++)
        pairs[i] = q.poll();
      for(int i=0; i<3; i++)
        pairs[i].f--;
      ArrayList<Integer> tmp = new ArrayList<Integer>();
      for(int i=0; i<3; i++)
        tmp.add(pairs[i].x);
      Collections.sort(tmp);
      ans.add(tmp);
      for(int i=0; i<3; i++)
        if(pairs[i].f > 0)
          q.add(pairs[i]);
    }
    out.println(ans.size());
    for(ArrayList<Integer> z : ans) {
      for(int i=2; i>=0; i--)
        out.print(z.get(i) + " ");
      out.println();
    }
    out.close();
  }
  static class Pair implements Comparable<Pair> {
    int x, f;
    Pair(int a, int b) {
      x = a; f = b;
    }
    public int compareTo(Pair p) {
      return p.f-f;
    }
  }
  static class FastScanner {
    BufferedReader br;
    StringTokenizer st;
    
    public FastScanner(InputStream in) {
      br = new BufferedReader(new InputStreamReader(in));
      scanLine();
    }
    public void scanLine() {
      try {
        st = new StringTokenizer(br.readLine().trim());
      } catch(Exception e) {
        throw new RuntimeException(e.getMessage());
      }
    }
    public int numTokens() {
      if(!st.hasMoreTokens()) {
        scanLine();
        return numTokens();
      }
      return st.countTokens();
    }
    public String next() {
      if(!st.hasMoreTokens()) {
        scanLine();
        return next();
      }
      return st.nextToken();
    }
    public double nextDouble() {
      return Double.parseDouble(next());
    }
    public long nextLong() {
      return Long.parseLong(next());
    }
    public int nextInt() {
      return Integer.parseInt(next());
    }
  }
}