#include <bits/stdc++.h>
using namespace std;
int n, a[1010100];
vector<int> Nega, Posi, Zero;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  for (int i = (1); i <= (n); ++i) {
    cin >> a[i];
    if (a[i] > 0) Posi.push_back(i);
    if (a[i] == 0) Zero.push_back(i);
    if (a[i] < 0) Nega.push_back(i);
  }
  sort(Nega.begin(), Nega.end(), [](int x, int y) { return a[x] < a[y]; });
  if (Nega.size() % 2) {
    Zero.push_back(Nega.back());
    Nega.pop_back();
  }
  for (int i = (1); i <= ((int)Zero.size() - 1); ++i)
    cout << 1 << ' ' << Zero[i] << ' ' << Zero[0] << '\n';
  if (Zero.size() && (int)Zero.size() != n) cout << 2 << ' ' << Zero[0] << '\n';
  for (int id : Nega) {
    Posi.push_back(id);
  }
  for (int i = (1); i <= ((int)Posi.size() - 1); ++i) {
    cout << 1 << ' ' << Posi[i] << ' ' << Posi[0] << '\n';
  }
}
