#include <bits/stdc++.h>
using namespace std;
int n, x, y, z, p[1000000], k, sol, sum, MOD = 1000000007, b[1000000], m, idx1,
                                         val, idx2, idx3;
vector<int> vp;
vector<pair<int, int>> vn;
vector<int> vz;
pair<int, int> a[1000000];
map<int, int> ma;
string s1, s2, s;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    scanf("%d", &x);
    if (x < 0)
      vn.push_back({x, i + 1});
    else if (x == 0)
      vz.push_back(i + 1);
    else
      vp.push_back(i + 1);
  }
  if (vp.size() > 0) idx1 = vp[vp.size() - 1];
  for (int i = 1; i < vp.size(); i++)
    cout << 1 << " " << vp[i - 1] << " " << vp[i] << endl;
  sort(vn.begin(), vn.end());
  if (vn.size() % 2 == 1) {
    if (vz.size() > 0 || vn.size() > 1 || vp.size() > 0) {
      if (vz.size() > 0) {
        cout << 1 << " " << vn[vn.size() - 1].second << " " << vz[0] << endl;
        vn.pop_back();
      } else {
        cout << 2 << " " << vn[vn.size() - 1].second << endl;
        vn.pop_back();
        k = 1;
      }
    }
    if (vn.size() > 0) idx2 = vn[vn.size() - 1].second;
    for (int i = 1; i < vn.size(); i++)
      cout << 1 << " " << vn[i - 1].second << " " << vn[i].second << endl;
  } else if (vn.size() > 0) {
    if (vn.size() > 0) idx2 = vn[vn.size() - 1].second;
    for (int i = 1; i < vn.size(); i++)
      cout << 1 << " " << vn[i - 1].second << " " << vn[i].second << endl;
  }
  if (vz.size() > 0 && k == 0) {
    if (vz.size() == 1) {
      if (vn.size() > 0 || vp.size() > 0) {
        cout << 2 << " " << vz[vz.size() - 1] << endl;
        vz.pop_back();
      } else
        idx3 = vz[vz.size() - 1];
    } else {
      for (int i = 1; i < vz.size(); i++)
        cout << 1 << " " << vz[i - 1] << " " << vz[i] << endl;
      if (vn.size() > 0 || vp.size() > 0) {
        cout << 2 << " " << vz[vz.size() - 1] << endl;
      } else
        idx3 = vz[vz.size() - 1];
    }
  } else if (vz.size() > 0) {
    for (int i = 1; i < vz.size(); i++)
      cout << 1 << " " << vz[i - 1] << " " << vz[i] << endl;
    idx3 = vz[vz.size() - 1];
  }
  if (idx1 > 0 && idx2 > 0) {
    cout << 1 << " " << idx1 << " " << idx2 << endl;
    if (idx3 > 0) cout << 1 << " " << idx3 << " " << idx2 << endl;
  } else if (idx3 > 0 && idx2 > 0) {
    cout << 1 << " " << idx3 << " " << idx2 << endl;
    if (idx1 > 0) cout << 1 << " " << idx1 << " " << idx2 << endl;
  } else if (idx3 > 0 && idx1 > 0) {
    cout << 1 << " " << idx3 << " " << idx1 << endl;
    if (idx2 > 0) cout << 1 << " " << idx1 << " " << idx2 << endl;
  }
  return 0;
}
