#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
const int M = 5e5 + 7;
const int inf = 1 << 26;
int n, a[N], cnt, ze, p, pos;
queue<int> q;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] == 0)
      q.push(i);
    else if (a[i] < 0) {
      ze = 1;
      cnt++;
      if (!p)
        p = i;
      else if (a[i] > a[p])
        p = i;
    } else
      ze = 1, pos = 1;
  }
  if (cnt % 2 && q.empty()) {
    printf("2 %d\n", p);
    int lst = 1;
    if (p == 1) lst = 2;
    for (int i = lst + 1; i <= n; i++) {
      if (i == p) continue;
      printf("1 %d %d\n", lst, i);
      lst = i;
    }
  } else {
    if (!q.empty()) {
      int lst = q.front();
      q.pop();
      if (cnt % 2) {
        printf("1 %d %d\n", lst, p);
        a[p] = 0;
        lst = p;
      }
      while (!q.empty()) {
        printf("1 %d %d\n", lst, q.front());
        lst = q.front();
        q.pop();
      }
      if (ze && (cnt > 1 || pos)) printf("2 %d\n", lst);
    }
    int lst;
    for (int i = 1; i <= n; i++) {
      if (a[i]) {
        lst = i;
        break;
      }
    }
    for (int i = lst + 1; i <= n; i++) {
      if (!a[i]) continue;
      printf("1 %d %d\n", lst, i);
      lst = i;
    }
  }
}
