#include <bits/stdc++.h>
using namespace std;
int a[200005], dem = 0, saln = -1e9 - 7, gt = 1, vta = 0, n, dem0 = 0, vt0 = 0,
               choco = 0;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] == 0) {
      dem0++;
      vt0 = i;
    }
    if (a[i] < 0) {
      dem++;
    }
    if (a[i] < 0 && saln < a[i]) {
      saln = a[i];
      vta = i;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] == 0 && i != vt0) cout << 1 << " " << i << " " << vt0 << endl;
  }
  if (dem % 2 == 1 && vt0 != 0) cout << 1 << " " << vta << " " << vt0 << endl;
  if (dem0 != n) {
    for (int i = 1; i <= n; i++) {
      if (dem % 2 == 1 && gt == i && gt == vta) gt++;
      if (gt == i && a[i] == 0) gt++;
    }
    if (dem0 == n - 1 && dem % 2 == 1)
      choco++;
    else {
      if (dem0 > 0)
        cout << 2 << " " << vt0 << endl;
      else if (dem % 2 == 1)
        cout << 2 << " " << vta << endl;
    }
    for (int i = 1; i <= n; i++) {
      if (a[i] == 0) continue;
      if (i == vta && dem % 2 == 1) continue;
      if (i == gt) continue;
      cout << 1 << " " << i << " " << gt << endl;
    }
  }
}
