#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  int a[n];
  set<pair<int, int>> s1, s2, s3;
  int c = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > 0)
      s1.insert({a[i], i});
    else if (a[i] == 0)
      s2.insert({a[i], i});
    else if (a[i] < 0)
      s3.insert({a[i], i});
  }
  while (s2.size() > 1) {
    int v1 = s2.begin()->second;
    s2.erase(s2.begin());
    int v2 = s2.begin()->second;
    cout << "1 " << v1 + 1 << ' ' << v2 + 1 << '\n';
    c++;
  }
  while (s3.size() > 1) {
    int v1 = s3.begin()->second;
    s3.erase(s3.begin());
    int v2 = s3.begin()->second;
    s3.erase(s3.begin());
    s1.insert({1, v2});
    cout << "1 " << v1 + 1 << ' ' << v2 + 1 << '\n';
    c++;
  }
  if (s3.size() == 1 && s2.size() == 1) {
    int v1 = s3.begin()->second;
    int v2 = s2.begin()->second;
    s3.erase(s3.begin());
    s2.erase(s2.begin());
    s2.insert({0, v2});
    cout << "1 " << v1 + 1 << ' ' << v2 + 1 << '\n';
    c++;
  }
  if (s3.size() == 1 && s2.size() == 0 && c < n - 1) {
    int v1 = s3.begin()->second;
    s3.erase(s3.begin());
    cout << "2 " << v1 + 1 << '\n';
  } else if (s3.size() == 0 && s2.size() == 1 && c < n - 1) {
    int v1 = s2.begin()->second;
    s2.erase(s2.begin());
    cout << "2 " << v1 + 1 << '\n';
  }
  while (s1.size() > 1) {
    int v1 = s1.begin()->second;
    s1.erase(s1.begin());
    int v2 = s1.begin()->second;
    cout << "1 " << v1 + 1 << ' ' << v2 + 1 << '\n';
  }
  return 0;
}
