Problem: You are given an array a consisting of n integers. You can perform the following operations with it: 

  1. Choose some positions i and j (1 ≤ i, j ≤ n, i ≠ j), write the value of a_i ⋅ a_j into the j-th cell and remove the number from the i-th cell; 
  2. Choose some position i and remove the number from the i-th cell (this operation can be performed no more than once and at any point of time, not necessarily in the beginning). 



The number of elements decreases by one after each operation. However, the indexing of positions stays the same. Deleted numbers can't be used in the later operations.

Your task is to perform exactly n - 1 operations with the array in such a way that the only number that remains in the array is maximum possible. This number can be rather large, so instead of printing it you need to print any sequence of operations which leads to this maximum number. Read the output format to understand what exactly you need to print.

Input

The first line contains a single integer n (2 ≤ n ≤ 2 ⋅ 10^5) — the number of elements in the array.

The second line contains n integers a_1, a_2, ..., a_n (-10^9 ≤ a_i ≤ 10^9) — the elements of the array.

Output

Print n - 1 lines. The k-th line should contain one of the two possible operations.

The operation of the first type should look like this: 1~ i_k~ j_k, where 1 is the type of operation, i_k and j_k are the positions of the chosen elements.

The operation of the second type should look like this: 2~ i_k, where 2 is the type of operation, i_k is the position of the chosen element. Note that there should be no more than one such operation.

If there are multiple possible sequences of operations leading to the maximum number — print any of them.

Examples

Input

5
5 -2 0 1 -3


Output

2 3
1 1 2
1 2 4
1 4 5


Input

5
5 2 0 4 0


Output

1 3 5
2 5
1 1 2
1 2 4


Input

2
2 -1


Output

2 2


Input

4
0 -10 0 0


Output

1 1 2
1 2 3
1 3 4


Input

4
0 0 0 0


Output

1 1 2
1 2 3
1 3 4

Note

Let X be the removed number in the array. Let's take a look at all the examples:

The first example has, for example, the following sequence of transformations of the array: [5, -2, 0, 1, -3] → [5, -2, X, 1, -3] → [X, -10, X, 1, -3] → [X, X, X, -10, -3] → [X, X, X, X, 30]. Thus, the maximum answer is 30. Note, that other sequences that lead to the answer 30 are also correct.

The second example has, for example, the following sequence of transformations of the array: [5, 2, 0, 4, 0] → [5, 2, X, 4, 0] → [5, 2, X, 4, X] → [X, 10, X, 4, X] → [X, X, X, 40, X]. The following answer is also allowed: 
    
    
      
    1 5 3  
    1 4 2  
    1 2 1  
    2 3  
    

Then the sequence of transformations of the array will look like this: [5, 2, 0, 4, 0] → [5, 2, 0, 4, X] → [5, 8, 0, X, X] → [40, X, 0, X, X] → [40, X, X, X, X].

The third example can have the following sequence of transformations of the array: [2, -1] → [2, X].

The fourth example can have the following sequence of transformations of the array: [0, -10, 0, 0] → [X, 0, 0, 0] → [X, X, 0, 0] → [X, X, X, 0].

The fifth example can have the following sequence of transformations of the array: [0, 0, 0, 0] → [X, 0, 0, 0] → [X, X, 0, 0] → [X, X, X, 0].

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;
import java.math.BigInteger; 

public class test {
    
    static int[][] dir={{0,1},{1,0},{-1,0},{0,-1}};
   static class sort implements Comparator<int[]>
   {
        public int compare(int[] a,int[] b)
        {
            if(a[0] == b[0]) return a[1]-b[1];
           return a[0]-b[0];
        }
   }
   public static void pri(PrintWriter out,Object o)
   {
      
    out.println(o.toString());
    
   }
   public static int intIn(String st)
   {
      return Integer.parseInt(st);
   }
   
   
    
    public static void pr(Object o)
    {
        System.out.println(o.toString());
    }
    public static void prW(Object o)
    {
        System.out.print(o.toString());
    }
    
   
    public static int inInt(String s)
    {
        return Integer.parseInt(s);
    }
    public static long in(String s)
    {
        return Long.parseLong(s);
    }

    static long power(long x, long y, long p)
      {
        long res = 1; // Initialize result
     
        x = x % p; // Update x if it is more than or
        // equal to p
     
        if (x == 0)
          return 0l; // In case x is divisible by p;
     
        while (y > 0)
        {
     
          // If y is odd, multiply x with result
          if ((y & 1) != 0)
            res = (res * x) % p;
     
          // y must be even now
          y = y >> 1; // y = y/2
          x = (x * x) % p;
        }
        return res;
      }
      static long gcd(long a, long b)
        {
          if (b == 0)
            return a;
          return gcd(b, a % b); 
        }
        static int gcd(int a, int b,int o)
        {
          if (b == 0)
            return a;
          return gcd(b, a % b,o); 
        }
    
      
    
    
    static int[] toIntArray(String[] m) 
    { 
        int[] p=new int[m.length];
        for(int o=0;o<m.length;o++)
        {
            p[o]= inInt(m[o]);
        }
        return p;
    }
    static long[] toLArray(String[] m) 
    { 
       long[] p=new long[m.length];
        for(int o=0;o<m.length;o++)
        {
            p[o]= in(m[o]);
        }
        return p;
    }
    public static long F(long[] arr)
    {
        //int len=arr.length;
        
       // Arrays.sort(arr);
        long med;
        if((arr.length%2) == 0)
        {
            med = (arr[arr.length/2] + arr[(arr.length/2)-1])/(2);
        }
        else
        {
            med = (arr[arr.length/2]);
        }
        long dis = 0l;

        for(long x : arr)
        {
            dis += (Math.abs(x-med));
           // prW(x+" ");
        }
        //prW(med);
       // pr("");
       // arr=tem;
        return dis;


    }
    static int[][] pre;// = new int[n][27];
    static int[][] fin;//
    public static String[] F(BufferedReader bf) throws Exception
    {
        return (bf.readLine().split(" "));
    }
    public static int F(int x,int y)
    {
        int[] preX = pre[x];
        int[] finX = fin[x];
        int[] preY = pre[y];int n=preX.length;int res=0;
        HashMap<Integer,Integer> t1,t2;
        t1=new HashMap<>();
        t2=new HashMap<>();
        for(int o=0;o<n;o++)
        {
            if(!t1.containsKey(preX[o])) t1.put(preX[o],o);
        }
        for(int o=preX.length-1;o>=0;o--)
        {
            if(!t2.containsKey(finX[o])) t2.put(finX[o],o);
        }
        for(int c=0;c<n;c++)
        {
            if(t1.containsKey(c) && t2.containsKey(c))
            {

                int coun;
                int i1,i3;
                i1 = t1.get(c);i3=t2.get(c);
                if(i1>=i3) continue;
                coun = preY[i3] - preY[i1];
                if(coun<0) coun=0;
                res = Math.max(res,2*c + coun);
            }
        }
        //pr(x+" "+y+" "+(res));;
        return res;
    }
    static long mod = 998244353l;
    static int[][] arr = {{0,0},{0,1},{1,0},{1,1}};
    public static long F(int i,int y,int c,Long[][][] dp,int n,int m)
    {
        if(i>=n)
        {
            if(c==m)
            {
                return 1l;
            }
            return 0l;
        }
        if(c>m) return 0l;
        if((m-c) > (2*(n-i))) return 0l;
        long sum=0l;
        if(dp[i][c][y] != null)  return dp[i][c][y];
        int u,j;u=(y%2);j=(y/2);
        for(int x=0;x<4;x++)
        {
            int a,b;a=(x%2);b=(x/2);
            if(u==a && j==b)
            {
                sum = (sum%mod + F(i+1,x,c,dp,n,m)%mod)%mod;
            }
            else if(u==a && j!=b)
            {
                if(a==b){
                 sum = (sum%mod + F(i+1,x,c,dp,n,m)%mod)%mod;}
                 else
                 {
                    sum = (sum%mod + F(i+1,x,c+1,dp,n,m)%mod)%mod;
                 }
                 //sum = (sum%mod + F(i+1,a,b,c+1,dp,n,m)%mod)%mod;
            }
             else if(u!=a && j==b)
            {
                 if(a==b){
                 sum = (sum%mod + F(i+1,x,c,dp,n,m)%mod)%mod;}
                 else
                 {
                    sum = (sum%mod + F(i+1,x,c+1,dp,n,m)%mod)%mod;
                 }
            }
            else if(u!=a && j!=b)
            {
                 if(a==b){
                 sum = (sum%mod + F(i+1,x,c+1,dp,n,m)%mod)%mod;}
                 else
                 {
                    sum = (sum%mod + F(i+1,x,c+2,dp,n,m)%mod)%mod;
                 }
            }
        }
        dp[i][c][y] = sum%mod;return dp[i][c][y];

    }
    public static void main (String[] args) throws Exception {
        
        BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);;;
        
        //int[] map=new int[1000001];
      
        int y=1;//Integer.parseInt(bf.readLine());
        
        for(int h=0;h<y;h++)
        {

            
    
            String[] xlp = bf.readLine().split(" ");
            
            int n,m,k,l,t;//boolean bol=false;
            n=inInt(xlp[0]);//m=inInt(xlp[1]);//k=inInt(xlp[2]);
            int[] arr = toIntArray(F(bf));
            Set<Integer> set=new HashSet<>();
            int min=1;int c=0;
            for(int o=0;o<n;o++)
            {
                if(arr[o] == 0)
                {
                    set.add(o);
                }
                else if(arr[o]<0)
                {
                    if(min==1) min=arr[o];
                    min=Math.max(min,arr[o]);
                    c++;
                }
            }
            if((c%2) != 0){
            int last=-1;
            for(int o=0;o<n;o++)
            {
                if(arr[o] == min)
                {
                    c++;last=o;
                }
            }
            set.add(last);
        }
        int curr ;int u=0;

            if(set.size()>0){
            curr = set.iterator().next();int op=curr;
            set.remove(curr);
            for(int x : set)
            {
                pri(out,1+" "+(curr+1)+" "+(x+1));u++;
                curr=x;
            }
            set.add(op);
            if(u<(n-1))
            pri(out,2+" "+(curr+1));}
            curr=-1;
            for(int o=0;o<n;o++)
            {
                if(set.contains(o)) continue;
                if(curr==-1)
                {
                    curr=o;continue;
                }
                else
                {
                    pri(out,1+" "+(curr+1)+" "+(o+1));
                    curr=o;
                }

            }
            out.close();





            
          
           
            

            

            
            
            
        }

    }
}
/*


static class SegmentTreeRMQ 
    { 
    int st[]; 
    int minVal(int x, int y) { 
        return (x > y) ? x : y; 
    } 
  
    
    int getMid(int s, int e) { 
        return s + (e - s) / 2; 
    } 
  
    
    int RMQUtil(int ss, int se, int qs, int qe, int index) 
    { 
        
        if (qs <= ss && qe >= se) 
            return st[index]; 
  
        // If segment of this node is outside the given range 
        if (se < qs || ss > qe) 
            return Integer.MIN_VALUE; 
  
        // If a part of this segment overlaps with the given range 
        int mid = getMid(ss, se); 
        return minVal(RMQUtil(ss, mid, qs, qe, 2 * index + 1), 
                RMQUtil(mid + 1, se, qs, qe, 2 * index + 2)); 
    } 
  
    // Return minimum of elements in range from index qs (query 
    // start) to qe (query end).  It mainly uses RMQUtil() 
    int RMQ(int n, int qs, int qe) 
    { 
        // Check for erroneous input values 
        
  
        return RMQUtil(0, n - 1, qs, qe, 0); 
    } 
  
    // A recursive function that constructs Segment Tree for 
    // array[ss..se]. si is index of current node in segment tree st 
    int constructSTUtil(int arr[], int ss, int se, int si) 
    { 
        // If there is one element in array, store it in current 
        //  node of segment tree and return 
        if (ss == se) { 
            st[si] = arr[ss]; 
            return arr[ss]; 
        } 
  
        // If there are more than one elements, then recur for left and 
        // right subtrees and store the minimum of two values in this node 
        int mid = getMid(ss, se); 
        st[si] = minVal(constructSTUtil(arr, ss, mid, si * 2 + 1), 
                constructSTUtil(arr, mid + 1, se, si * 2 + 2)); 
        return st[si]; 
    } 
  
    
    void con(int arr[]) 
    { 
        // Allocate memory for segment tree 
  
        //Height of segment tree 
        int n = (arr.length);
        int x = (int) (Math.ceil(Math.log(n) / Math.log(2))); 
  
        //Maximum size of segment tree 
        int max_size = 2 * (int) Math.pow(2, x) - 1; 
        st = new int[max_size]; // allocate memory 
  
        // Fill the allocated memory st 
        constructSTUtil(arr, 0, n - 1, 0); 
    }
    }
     static class DSU {
    
    int[] p;int[] sz;int op;int c;;
    int[] last;
    public void G(int n)
    {
        last=new int[n];
        p=new int[n];
        sz=new int[n];c=n;
        op=n;
        for(int h=0;h<n;h++)
        {
            sz[h]=1;p[h]=h;
            last[h]=h;
        }
    }
    public int find(int x)
    {
        int y=x;
        while(x!=p[x]) x=p[x];
        while(y!=p[y])
        {
            int tem=p[y];
            p[y]=x;y=tem;
        }
        return p[y];
    }
    public void union(int a,int b)
    {
        int x,y;
        x=find(a);y=find(b);
        if(x==y) return;
        if(sz[x]>sz[y])
        {
            p[y] = x;
            sz[x]+=sz[y];
            last[x]=Math.max(last[x],last[y]);
        }
        else
        {
            p[x]=y;sz[y]+=sz[x];
            last[y]=Math.max(last[y],last[x]);
        }
        c--;
        
    }}

*/