#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const long long mod = 1000000007;
int n;
int num[200005], used[200005];
int find(int be, int flag) {
  for (int i = be; i <= n; i++) {
    if (flag == 0) {
      if (num[i] == 0) return i;
    } else {
      if (num[i] != 0) return i;
    }
  }
}
int main() {
  int maxx = -1e9 - 1;
  int sum = 0, tot = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &num[i]);
    if (num[i] < 0) {
      tot++;
      maxx = max(maxx, num[i]);
    }
    if (num[i] > 0) sum++;
  }
  if (sum == 0) {
    if (tot == 0) {
      for (int i = 1; i < n; i++) printf("1 %d %d\n", i, i + 1);
      return 0;
    } else if (tot == 1) {
      for (int i = 1; i < n; i++) printf("1 %d %d\n", i, i + 1);
      return 0;
    }
  }
  if (tot & 1) {
    for (int i = 1; i <= n; i++) {
      if (num[i] == maxx) {
        num[i] = 0;
        break;
      }
    }
  }
  int zero = 0;
  for (int i = 1; i <= n; i++) {
    if (num[i] == 0) zero++;
  }
  if (zero >= 1) {
    int dir;
    for (int i = 1; i <= n; i++) {
      if (num[i] == 0) {
        dir = i;
        break;
      }
    }
    while (zero > 1) {
      int next_dir = find(dir + 1, 0);
      printf("1 %d %d\n", dir, next_dir);
      dir = next_dir;
      zero--;
    }
    printf("2 %d\n", dir);
    int cnt = 0;
    dir = -1;
    for (int i = 1; i <= n; i++) {
      if (num[i] != 0) {
        if (dir == -1) dir = i;
        cnt++;
      }
    }
    while (cnt > 1) {
      int next_dir = find(dir + 1, 1);
      printf("1 %d %d\n", dir, next_dir);
      dir = next_dir;
      cnt--;
    }
  } else {
    for (int i = 1; i < n; i++) printf("1 %d %d\n", i, i + 1);
  }
  return 0;
}
