#include <bits/stdc++.h>
using namespace std;
int n;
vector<pair<int, int> > neg;
vector<int> zero;
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    int x;
    cin >> x;
    if (x == 0)
      zero.push_back(i);
    else if (x < 0)
      neg.push_back({x, i});
  }
  sort((neg).begin(), (neg).end());
  vector<bool> used(n + 1);
  int left = n - 1;
  if (zero.empty()) {
    if (neg.size() & 1) {
      int rmv = neg.back().second;
      used[rmv] = true;
      cout << 2 << ' ' << rmv << "\n";
      --left;
    }
  } else {
    for (int i = 0; i < zero.size(); ++i) {
      if (i + 1 < zero.size()) {
        cout << 1 << ' ' << zero[i] << ' ' << zero[i + 1] << "\n";
        --left;
      }
      used[zero[i]] = true;
    }
    if (neg.size() & 1) {
      int rmv = neg.back().second;
      used[rmv] = true;
      cout << 1 << ' ' << rmv << ' ' << zero.back() << "\n";
      --left;
    }
    if (left) {
      cout << 2 << ' ' << zero.back() << "\n";
      --left;
    }
  }
  vector<int> v;
  for (int i = 1; i <= n; ++i) {
    if (used[i]) continue;
    v.push_back(i);
  }
  for (int i = 0; i + 1 < v.size(); ++i) {
    cout << 1 << ' ' << v[i] << ' ' << v[i + 1] << "\n";
  }
}
