#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long T = 1, i, j;
  while (T--) {
    long long n;
    cin >> n;
    vector<long long> v(n);
    vector<long long> neg, zero;
    long long pos = 0;
    for (i = 0; i < n; i++) {
      cin >> v[i];
      if (v[i] > 0) {
        pos++;
      }
      if (v[i] < 0) {
        neg.push_back(i);
      }
      if (v[i] == 0) {
        zero.push_back(i);
      }
    }
    if (neg.size() == n) {
      sort(neg.begin(), neg.end(),
           [&](long long a, long long b) { return v[a] < v[b]; });
      vector<bool> bad2(n);
      if (n % 2 != 0) {
        bad2[neg.back()] = true;
        cout << "2 " << neg.back() + 1 << endl;
      }
      vector<long long> ind;
      for (i = 0; i < n; i++) {
        if (!bad2[i]) {
          ind.push_back(i);
        }
      }
      for (i = 1; i < ind.size(); i++) {
        cout << "1 " << ind[i - 1] + 1 << " " << ind[i] + 1 << endl;
      }
      return 0;
    }
    if (zero.size() == 0 && neg.size() == 0) {
      for (i = 1; i < n; i++) {
        cout << "1 " << i << " " << i + 1 << endl;
      }
      return 0;
    }
    vector<bool> bad(n);
    sort(neg.begin(), neg.end(),
         [&](long long a, long long b) { return v[a] < v[b]; });
    if (neg.size() % 2 == 1) {
      zero.push_back(neg.back());
      auto it = neg.end();
      it--;
      neg.erase(it);
    }
    long long end = zero.size() - 1;
    if (zero.size() > 0) {
      while (end > 0) {
        bad[zero[end]] = true;
        bad[zero[end - 1]] = true;
        cout << "1 " << zero[end] + 1 << " " << zero[end - 1] + 1 << endl;
        end--;
      }
      if (zero.size() < n) {
        cout << "2 " << zero[0] + 1 << endl;
        bad[zero[0]] = true;
      }
    }
    vector<long long> indices;
    for (i = 0; i < n; i++) {
      if (!bad[i]) {
        indices.push_back(i);
      }
    }
    for (i = 1; i < indices.size(); i++) {
      cout << "1 " << indices[i - 1] + 1 << " " << indices[i] + 1 << endl;
    }
  }
  return 0;
}
