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.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

/*
 public class _140C {

 }

 */
public class _140C {
  class ele {
    int num;
    int fre;

    /**
     * @param num
     * @param fre
     */
    public ele(int num, int fre) {
      super();
      this.num = num;
      this.fre = fre;
    }



  }

  public void solve() throws FileNotFoundException {
    InputStream inputStream = System.in;

    InputHelper in = new InputHelper(inputStream);

    // actual solution
    int n = in.readInteger();

    int[] r = new int[n];

    for (int i = 0; i < n; i++) {
      r[i] = in.readInteger();
    }

    Map<Integer, Integer> map = new HashMap<Integer, Integer>();

    for (int i = 0; i < n; i++) {
      map.put(r[i], map.getOrDefault(r[i], 0) + 1);
    }

    PriorityQueue<ele> pq = new PriorityQueue<_140C.ele>((e1, e2) -> {
      return e2.fre - e1.fre;
    });

    for (Integer key : map.keySet()) {
      int val = map.get(key);

      ele ele = new ele(key, val);

      pq.add(ele);
    }

    int ans = 0;
    List<a> al = new ArrayList<_140C.a>();;
    while (pq.size() >= 3) {
      ele e1 = pq.poll();
      ele e2 = pq.poll();
      ele e3 = pq.poll();

      ans++;

      al.add(new a(e1.num, e2.num, e3.num));

      e1.fre--;
      e2.fre--;
      e3.fre--;

      if (e1.fre > 0)
        pq.add(e1);

      if (e2.fre > 0)
        pq.add(e2);

      if (e3.fre > 0)
        pq.add(e3);
    }

    System.out.println(ans);

    for (int i = 0; i < al.size(); i++) {
      a a = al.get(i);
      System.out.println(a.b + " " + a.m + " " + a.s);
    }
    // end here
  }

  class a {
    int b;
    int m;
    int s;

    /**
     * @param b
     * @param m
     * @param s
     */
    public a(int b, int m, int s) {
      super();

      int[] ar = new int[] { b, m, s };

      Arrays.sort(ar);

      this.b = ar[2];
      this.m = ar[1];
      this.s = ar[0];
    }


  }

  public static void main(String[] args) throws FileNotFoundException {
    (new _140C()).solve();
  }

  class InputHelper {
    StringTokenizer tokenizer = null;
    private BufferedReader bufferedReader;

    public InputHelper(InputStream inputStream) {
      InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
      bufferedReader = new BufferedReader(inputStreamReader, 16384);
    }

    public String read() {
      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
        try {
          String line = bufferedReader.readLine();
          if (line == null) {
            return null;
          }
          tokenizer = new StringTokenizer(line);
        } catch (IOException e) {
          e.printStackTrace();
        }
      }

      return tokenizer.nextToken();
    }

    public Integer readInteger() {
      return Integer.parseInt(read());
    }

    public Long readLong() {
      return Long.parseLong(read());
    }
  }
}