#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int MAXN = 2e5 + 10;
int a[MAXN], vis[MAXN];
int main() {
  int n;
  cin >> n;
  int f = 0, mx = -INF, k;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] < 0) {
      f = !f;
      if (mx < a[i]) mx = a[i], k = i;
    }
  }
  int cnt = 0, last = 0;
  for (int i = 1; i <= n; i++)
    if (a[i] == 0 || f && i == k) vis[i] = 1, cnt++, last = i;
  if (cnt == n) {
    for (int i = 1; i < n; i++) printf("1 %d %d\n", i, i + 1);
    exit(0);
  }
  if (cnt) {
    for (int i = 1; i <= n; i++) {
      if (!vis[i]) continue;
      for (int j = i + 1; j <= n; j++) {
        if (vis[j]) {
          printf("1 %d %d\n", i, j);
          last = j;
          break;
        }
      }
    }
    printf("2 %d\n", last);
  }
  for (int i = 1; i <= n; i++) {
    if (vis[i]) continue;
    for (int j = i + 1; j <= n; j++) {
      if (!vis[j]) {
        printf("1 %d %d\n", i, j);
        break;
      }
    }
  }
  return 0;
}
