#include <bits/stdc++.h>
using namespace std;
vector<pair<long long int, long long int> > neg;
vector<pair<long long int, long long int> > zer;
vector<pair<long long int, long long int> > pos;
vector<long long int> vec;
int main() {
  long long int i, n, j, k, x, y;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> j;
    vec.push_back(j);
    if (j < 0) neg.push_back(make_pair(-j, i));
    if (j > 0) pos.push_back(make_pair(j, i));
    if (j == 0) zer.push_back(make_pair(j, i));
  }
  if (zer.size() == n) {
    for (i = 1; i < n; i++) printf("1 %lld %lld\n", i, i + 1);
    return 0;
  }
  sort(neg.begin(), neg.end());
  if (zer.size() == 0) {
    long long int sz = neg.size();
    long long int pz = pos.size();
    if (sz == 0) {
      for (i = 0; i < pos.size() - 1; i++)
        printf("1 %lld %lld\n", pos[i].second, pos[i + 1].second);
      return 0;
    }
    if (pz == 0) {
      if (sz % 2 == 1) {
        printf("2 %lld\n", neg[0].second);
        for (i = 1; i < neg.size() - 1; i++)
          printf("1 %lld %lld\n", neg[i].second, neg[i + 1].second);
        return 0;
      }
      for (i = 0; i < neg.size() - 1; i++)
        printf("1 %lld %lld\n", neg[i].second, neg[i + 1].second);
      return 0;
    }
    if (sz % 2 == 0) {
      for (i = 0; i < pos.size() - 1; i++)
        printf("1 %lld %lld\n", pos[i].second, pos[i + 1].second);
      for (i = 0; i < neg.size() - 1; i++)
        printf("1 %lld %lld\n", neg[i].second, neg[i + 1].second);
      printf("1 %lld %lld\n", neg[sz - 1].second, pos[pos.size() - 1].second);
      return 0;
    } else {
      printf("2 %lld\n", neg[0].second);
      for (i = 0; i < pos.size() - 1; i++)
        printf("1 %lld %lld\n", pos[i].second, pos[i + 1].second);
      for (i = 1; i < neg.size() - 1; i++)
        printf("1 %lld %lld\n", neg[i].second, neg[i + 1].second);
      if (sz == 1) return 0;
      printf("1 %lld %lld\n", neg[sz - 1].second, pos[pos.size() - 1].second);
      return 0;
    }
  }
  if (zer.size() >= 1) {
    long long int sz = neg.size();
    long long int pz = pos.size();
    if (sz == 0) {
      for (i = 0; i < zer.size() - 1; i++)
        printf("1 %lld %lld\n", zer[i].second, zer[i + 1].second);
      printf("2 %lld\n", zer[zer.size() - 1].second);
      for (i = 0; i < pos.size() - 1; i++)
        printf("1 %lld %lld\n", pos[i].second, pos[i + 1].second);
      return 0;
    }
    if (pz == 0) {
      if (sz % 2 == 0) {
        for (i = 0; i < zer.size() - 1; i++)
          printf("1 %lld %lld\n", zer[i].second, zer[i + 1].second);
        printf("2 %lld\n", zer[zer.size() - 1].second);
        for (i = 0; i < neg.size() - 1; i++)
          printf("1 %lld %lld\n", neg[i].second, neg[i + 1].second);
        return 0;
      } else {
        for (i = 0; i < zer.size() - 1; i++)
          printf("1 %lld %lld\n", zer[i].second, zer[i + 1].second);
        printf("1 %lld %lld\n", zer[zer.size() - 1].second, neg[0].second);
        if (sz == 1) return 0;
        printf("2 %lld\n", neg[0].second);
        for (i = 1; i < neg.size() - 1; i++)
          printf("1 %lld %lld\n", neg[i].second, neg[i + 1].second);
        return 0;
      }
    }
    if (sz % 2 == 0) {
      for (i = 0; i < zer.size() - 1; i++)
        printf("1 %lld %lld\n", zer[i].second, zer[i + 1].second);
      printf("2 %lld\n", zer[zer.size() - 1].second);
      for (i = 0; i < pos.size() - 1; i++)
        printf("1 %lld %lld\n", pos[i].second, pos[i + 1].second);
      for (i = 0; i < neg.size() - 1; i++)
        printf("1 %lld %lld\n", neg[i].second, neg[i + 1].second);
      printf("1 %lld %lld\n", neg[sz - 1].second, pos[pos.size() - 1].second);
      return 0;
    } else {
      for (i = 0; i < zer.size() - 1; i++)
        printf("1 %lld %lld\n", zer[i].second, zer[i + 1].second);
      printf("1 %lld %lld\n", zer[zer.size() - 1].second, neg[0].second);
      printf("2 %lld\n", neg[0].second);
      for (i = 0; i < pos.size() - 1; i++)
        printf("1 %lld %lld\n", pos[i].second, pos[i + 1].second);
      for (i = 1; i < neg.size() - 1; i++)
        printf("1 %lld %lld\n", neg[i].second, neg[i + 1].second);
      if (sz == 1) return 0;
      printf("1 %lld %lld\n", neg[sz - 1].second, pos[pos.size() - 1].second);
      return 0;
    }
  }
}
