#include <bits/stdc++.h>
using namespace std;
vector<int> l;
vector<int> f;
vector<int> z;
int a[200050];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  int li = 0, fu = 0, ze = 0;
  f.clear();
  l.clear();
  int res = -1000000001;
  int pos;
  for (int i = 1; i <= n; ++i) {
    if (a[i] < 0) {
      fu++;
      f.push_back(i);
      if (a[i] > res) {
        res = a[i];
        pos = i;
      }
    } else if (a[i] == 0) {
      li++;
      l.push_back(i);
    } else {
      ze++;
      z.push_back(i);
    }
  }
  if (fu % 2 == 0) {
    if (li > 0) {
      for (int i = 0; i < l.size() - 1; i++) {
        printf("1 %d %d\n", l[i], l[i + 1]);
      }
      if (li != n) printf("2 %d\n", l[l.size() - 1]);
    }
    for (int i = 0; i < f.size(); i++) z.push_back(f[i]);
    int len = z.size() - 1;
    for (int i = 0; i < len; i++) {
      printf("1 %d %d\n", z[i], z[i + 1]);
    }
  } else {
    l.push_back(pos);
    li++;
    if (li > 0) {
      for (int i = 0; i < l.size() - 1; i++) {
        printf("1 %d %d\n", l[i], l[i + 1]);
      }
      if (li != n) printf("2 %d\n", l[l.size() - 1]);
    }
    for (int i = 0; i < f.size(); i++) {
      if (f[i] == pos) continue;
      z.push_back(f[i]);
    }
    int len = z.size() - 1;
    for (int i = 0; i < len; i++) {
      printf("1 %d %d\n", z[i], z[i + 1]);
    }
  }
}
