#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, long long>> mas1;
long long was[1000000];
vector<pair<long long, long long>> mas2;
int cmp1(pair<long long, long long> &a, pair<long long, long long> &b) {
  return a.first > b.first;
}
vector<pair<long long, long long>> garb;
void un(vector<pair<long long, long long>> &a) {
  for (int i = 1; i < a.size(); i++) {
    printf("1 %lld %lld\n", a[i].second + 1, a[0].second + 1);
  }
}
int main() {
  long long n;
  cin >> n;
  long long a;
  int p = -1;
  bool f = false;
  for (int i = 0; i < n; i++) {
    scanf("%lld", &a);
    if (a < 0) {
      mas1.push_back({a, i});
    }
    if (a > 0) {
      mas2.push_back({a, i});
    }
    if (a == 0) {
      garb.push_back({a, i});
    }
  }
  sort(mas1.begin(), mas1.end(), cmp1);
  if (mas1.size() % 2 == 0) {
    p = 0;
  } else {
    p = 1;
    garb.push_back(mas1[0]);
  }
  for (int i = p; i < mas1.size(); i++) {
    mas2.push_back(mas1[i]);
  }
  un(garb);
  if (garb.size() > 0 && garb.size() != n) {
    cout << 2 << " " << garb[0].second + 1 << endl;
  }
  un(mas2);
  return 0;
}
