#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, a[200005], ans = 1, iu = 0;
  scanf("%lld", &n);
  vector<pair<long long, long long> > negatives;
  vector<pair<long long, long long> > zeros;
  vector<pair<long long, long long> > positives;
  long long con1 = -1, con0 = -1;
  for (long long i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
    if (a[i] < 0)
      negatives.push_back({a[i], i + 1});
    else if (a[i] > 0)
      positives.push_back({a[i], i + 1});
    else
      zeros.push_back({a[i], i + 1});
  }
  sort(negatives.begin(), negatives.end());
  long long sn = negatives.size();
  long long pn = positives.size();
  long long snisodd = 1;
  if (sn % 2 == 0) snisodd = 0;
  if (sn > 0) {
    if (sn == 1) {
      con0 = negatives[0].second;
    } else if (sn % 2 == 0) {
      snisodd = 0;
      int i = 0;
      for (; i < sn - 1; i++) {
        ans *= negatives[i].first;
        printf("1 %lld %lld\n", negatives[i].second, negatives[i + 1].second);
        con1 = negatives[i + 1].second;
      }
      ans *= negatives[i].first;
    } else {
      int i = 0;
      for (; i < sn - 2; i++) {
        ans *= negatives[i].first;
        printf("1 %lld %lld\n", negatives[i].second, negatives[i + 1].second);
      }
      ans *= negatives[i].first;
      con1 = negatives[i].second;
      con0 = negatives[i + 1].second;
    }
  }
  long long zn = zeros.size();
  if (zn > 0) {
    if (snisodd) {
      printf("1 %lld %lld\n", con0, zeros[0].second);
      int i = 0;
      for (; i < zn - 1; i++) {
        printf("1 %lld %lld\n", zeros[i].second, zeros[i + 1].second);
      }
      if (pn || sn > 1) {
        printf("2 %lld\n", zeros[i].second);
        con0 = -1;
      }
    } else {
      int i = 0;
      for (; i < zn - 1; i++) {
        printf("1 %lld %lld\n", zeros[i].second, zeros[i + 1].second);
      }
      if (pn || sn) {
        printf("2 %lld\n", zeros[i].second);
      }
    }
  } else if (snisodd && (sn > 1 || pn > 0)) {
    printf("2 %lld\n", negatives[sn - 1].second);
  }
  if (pn > 0) {
    if (con1 != -1) printf("1 %lld %lld\n", con1, positives[0].second);
    for (int i = 0; i < pn - 1; i++) {
      printf("1 %lld %lld\n", positives[i].second, positives[i + 1].second);
    }
  }
  return 0;
}
