#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int a[N];
bool ban[N];
vector<int> z;
int sign(int x) {
  if (x >= 0)
    return 1;
  else
    return -1;
}
int main() {
  int n;
  scanf("%d", &n);
  int lastf = -2e9, lp;
  int h = 1;
  bool all0 = true;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] == 0)
      z.push_back(i), ban[i] = 1;
    else
      all0 = false;
    h *= sign(a[i]);
    if (a[i] < 0 && a[i] > lastf) lastf = a[i], lp = i;
  }
  if (all0) {
    for (int i = 1; i < n; i++) printf("1 %d %d\n", i, i + 1);
    return 0;
  }
  if (h < 0) {
    z.push_back(lp);
    ban[lp] = 1;
  }
  if (z.size()) {
    for (int i = 0, sz = z.size(); i < sz - 1; i++)
      printf("1 %d %d\n", z[i], z[i + 1]);
    if (z.size() != n) printf("2 %d\n", z[z.size() - 1]);
  }
  int t = 1;
  while (t <= n && ban[t]) t++;
  for (int i = t; i <= n;) {
    int j = i + 1;
    while (j <= n && ban[j]) j++;
    if (j > n) break;
    printf("1 %d %d\n", i, j);
    i = j;
  }
}
