#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using namespace std;
int n, a[200004], sa, s0, cnt = 0;
vector<int> bad;
bool b[200004];
void delet() {
  int nn = bad.size();
  for (int i = (0); i <= (nn - 1); ++i) {
    if (cnt == n - 1) break;
    if (nn - i == 1) {
      cout << "2 " << bad[i] << '\n';
      b[bad[i]] = 0;
    } else {
      b[bad[i]] = 0;
      cout << "1 " << bad[i] << ' ' << bad[i + 1] << '\n';
    }
    cnt++;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  for (int i = (1); i <= (n); ++i) {
    cin >> a[i];
    if (a[i] < 0) {
      sa++;
    }
    if (a[i] == 0) {
      s0++;
      bad.push_back(i);
    }
  }
  int mnam = -1e9 - 1, mnid;
  if (sa & 1)
    for (int i = (1); i <= (n); ++i)
      if (a[i] < 0 && a[i] > mnam) {
        mnam = a[i];
        mnid = i;
      }
  if (sa & 1) bad.push_back(mnid);
  fill(b, b + 2 + n, 1);
  delet();
  int tem = 1;
  if (!b[1]) tem = 0;
  for (int i = (2); i <= (n); ++i) {
    if (cnt == n - 1) break;
    if (b[i]) {
      if ((tem == 0 && i == 2) || (!b[i - 1])) {
        continue;
      }
      cout << "1 " << i - 1 << ' ' << i << '\n';
      cnt++;
    } else {
      int t1 = i - 1, t2 = i + 1;
      while (!b[t1]) t1++;
      while (!b[t2]) t2++;
      if (t1 == t2) {
        i = t1;
        continue;
      }
      if (t2 > n) continue;
      cout << "1 " << t1 << ' ' << t2 << '\n';
      cnt++;
    }
  }
}
