#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 5;
int pos[MAX], a[MAX];
int tot, cnt;
int main() {
  int n, cur = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
    if (a[i] == 0) pos[++tot] = i;
    if (a[i] < 0) cnt++;
  }
  if (cnt % 2 == 0) {
    int last = -1;
    for (int i = 1; i <= n; i++) {
      if (a[i] == 0)
        continue;
      else {
        if (last == -1)
          last = i;
        else
          printf("1 %d %d\n", last, i), last = i, cur++;
      }
    }
    for (int i = 2; i <= tot; i++)
      printf("1 %d %d\n", pos[i - 1], pos[i]), cur++;
    if (cur != n - 1) printf("2 %d\n", pos[tot]);
  } else {
    int x = -1e9 - 12, tar;
    for (int i = 1; i <= n; i++) {
      if (a[i] >= 0) continue;
      if (a[i] > x) tar = i, x = a[i];
    }
    tot = 0;
    for (int i = 1; i <= n; i++) {
      if (i == tar || a[i] == 0) pos[++tot] = i;
    }
    int last = -1;
    for (int i = 1; i <= n; i++) {
      if (a[i] == 0 || i == tar)
        continue;
      else {
        if (last == -1)
          last = i;
        else
          printf("1 %d %d\n", last, i), last = i, cur++;
      }
    }
    for (int i = 2; i <= tot; i++)
      printf("1 %d %d\n", pos[i - 1], pos[i]), cur++;
    if (cur != n - 1) printf("2 %d\n", pos[tot]);
  }
  return 0;
}
