#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int inf = INT_MAX - 1;
set<int> good;
set<int> bad;
void print() {
  auto it = bad.begin();
  while (it != bad.end()) {
    int first = *it;
    it++;
    if (it == bad.end()) {
      break;
    }
    cout << "1 " << first << " " << *it << "\n";
  }
  if (good.size() == 0) {
    return;
  }
  if (bad.size() > 0) cout << "2 " << *bad.rbegin() << "\n";
  it = good.begin();
  while (it != good.end()) {
    int first = *it;
    it++;
    if (it == good.end()) {
      break;
    }
    cout << "1 " << first << " " << *it << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  int arr[n + 1];
  int largestNegative = -1;
  int negatives = 0;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
    if (arr[i] == 0) {
      bad.insert(i);
    } else {
      good.insert(i);
      if (arr[i] < 0) {
        negatives++;
        if (largestNegative == -1) {
          largestNegative = i;
        } else if (arr[largestNegative] < arr[i]) {
          largestNegative = i;
        }
      }
    }
  }
  if (negatives & 1) {
    auto pos = good.find(largestNegative);
    good.erase(pos);
    bad.insert(largestNegative);
  }
  print();
}
