#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long n, zero = 0, neg = 0, mm = 10000000000, ind = -1, cnt = 0;
  cin >> n;
  vector<long long> a(n), z, e, o, c(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    long long x = abs(a[i]);
    if (x == 0) {
      zero++;
      z.push_back(i);
    }
    if (a[i] < 0) {
      neg++;
      if (abs(a[i]) < mm) {
        mm = abs(a[i]);
        ind = i;
      }
    }
  }
  if (neg % 2 == 1) {
    if (z.size() != 0) {
      cout << 1 << " " << ind + 1 << " " << z[0] + 1 << "\n";
    } else {
      cout << 2 << " " << ind + 1 << "\n";
    }
    c[ind] = -1;
    cnt++;
  }
  if (cnt == n - 1) {
    return 0;
  }
  if (z.size() != 0) {
    long long l = z[0];
    c[l] = -1;
    for (long long i = 1; i < z.size(); i++) {
      cout << 1 << " " << l + 1 << " " << z[i] + 1 << "\n";
      c[z[i]] = -1;
      l = z[i];
      cnt++;
      if (cnt == n - 1) {
        return 0;
      }
    }
  }
  if (z.size() != 0) {
    cout << 2 << " " << z.back() + 1 << "\n";
    cnt++;
  }
  if (cnt == n - 1) {
    return 0;
  }
  long long v = -1;
  for (long long i = 0; i < n; i++) {
    if (c[i] == 0) {
      if (v == -1) {
        v = i + 1;
      } else {
        cout << 1 << " " << v << " " << i + 1 << "\n";
        v = i + 1;
        cnt++;
        if (cnt == n - 1) {
          return 0;
        }
      }
    }
  }
  return 0;
}
