The School №0 of the capital of Berland has n children studying in it. All the children in this school are gifted: some of them are good at programming, some are good at maths, others are good at PE (Physical Education). Hence, for each child we know value ti:

  * ti = 1, if the i-th child is good at programming, 
  * ti = 2, if the i-th child is good at maths, 
  * ti = 3, if the i-th child is good at PE 



Each child happens to be good at exactly one of these three subjects.

The Team Scientific Decathlon Olympias requires teams of three students. The school teachers decided that the teams will be composed of three children that are good at different subjects. That is, each team must have one mathematician, one programmer and one sportsman. Of course, each child can be a member of no more than one team.

What is the maximum number of teams that the school will be able to present at the Olympiad? How should the teams be formed for that?

Input

The first line contains integer n (1 ≤ n ≤ 5000) — the number of children in the school. The second line contains n integers t1, t2, ..., tn (1 ≤ ti ≤ 3), where ti describes the skill of the i-th child.

Output

In the first line output integer w — the largest possible number of teams. 

Then print w lines, containing three numbers in each line. Each triple represents the indexes of the children forming the team. You can print both the teams, and the numbers in the triplets in any order. The children are numbered from 1 to n in the order of their appearance in the input. Each child must participate in no more than one team. If there are several solutions, print any of them.

If no teams can be compiled, print the only line with value w equal to 0.

Examples

Input

7
1 3 1 3 2 1 2


Output

2
3 5 2
6 7 4


Input

4
2 1 1 2


Output

0
// All important imports

import static java.lang.System.in;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.Vector;


/**
 *
 * @author Mustafa Filmwala
 * CODEFORCES
 *
 */




 public class br {
    static BufferedReader reader;
    static StringTokenizer tokenizer;
    static byte[] buffer = new byte[8192];
    static int offset = 0;
    static int bufferSize = 0;
    static int BUFFER_SIZE = 65000;
    static DataInputStream din;
    static int bufferPointer, bytesRead;
    public static void main(String[] args) throws Exception {

                PrintWriter out=new PrintWriter(System.out);
                br.init(System.in);
                int tc,i,n,check,l,r,arr[],co[];
                ArrayList<Integer> a1=new ArrayList<Integer>(),a2=new ArrayList<Integer>(),a3=new ArrayList<Integer>();
                String s,ans;


                tc=br.ni();//System.out.println("f0");
                arr=new int[tc];
                co=new int[4];
                for(i=0;i<tc;i++){arr[i]=br.ni(); co[arr[i]]++; if(arr[i]==1)a1.add(i+1); else if(arr[i]==2)a2.add(i+1); else a3.add(i+1);}
                n=Math.min(co[1],Math.min(co[2],co[3]));
                System.out.println(n);
                for(i=0;i<n;i++)
                {
                    System.out.println(a1.get(i)+" "+a2.get(i)+" "+a3.get(i));
                }
                out.close();
                  }















    //--------------------------------------------------------------------------------------------------------
    //----------------INPUT CLASS- DO NOT MIX------------------------------------
    //--------------------Actual Solution is at the top-------------------------------------------------------
    //--------------------------------------------------------------------------------------------------------
   
    static void init(InputStream input) {
        reader = new BufferedReader(
                     new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
         din = new DataInputStream(in);
         buffer = new byte[BUFFER_SIZE];
         bufferPointer = bytesRead = 0;
    }

    // get next word
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                   reader.readLine() );
        }
        return tokenizer.nextToken();
    }

        public static String ns() throws Exception {
        StringBuffer sb = new StringBuffer("");
        byte c = read();
        while (c <= ' ') {
            c = read();
        }
        do {
            sb.append((char) c);
            c = read();
        } while (c > ' ');
        return sb.toString();
    }

    public static char nc() throws Exception {
        byte c = read();
        while (c <= ' ') {
            c = read();
        }
        return (char) c;
    }
        // next int
    static int ni() throws Exception{
      int ret = 0;
      byte c = read();
      while (c <= ' ') c = read();
      boolean neg = c == '-';
      if (neg) c = read();
      do
      {
         ret = ret * 10 + c - '0';
         c = read();
      } while (c > ' ');
      if (neg) return -ret;
      return ret;

    }
    static void fillBuffer() throws Exception
    {
      bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
      if (bytesRead == -1) buffer[0] = -1;
    }

    static byte read() throws Exception
    {
      if (bufferPointer == bytesRead) fillBuffer();
      return buffer[bufferPointer++];
    }
        // get next long
     static long nl() throws Exception{
      long ret = 0;
      byte c = read();
      while (c <= ' ') c = read();
      boolean neg = c == '-';
      if (neg) c = read();
      do
      {
         ret = ret * 10 + c - '0';
         c = read();
      } while (c > ' ');
      if (neg) return -ret;
      return ret;

    }
        // next double
    static double nd() throws IOException {
        return Double.parseDouble( next() );
    }
        // next integer array
    static int[] nia(int size) throws Exception{
        int a[]=new int[size];
        for(int i=0;i<size;i++)a[i]=ni();
        return a;
    }
        // next long array
    static long[] nla(int size) throws Exception{
        long a[]=new long[size];
        for(int i=0;i<size;i++)a[i]=nl();
        return a;
    }
}  