#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const double eps = 0;
const int ms = 0;
const int md = 0;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> (n);
  vector<int> a(n);
  for (__typeof(0) i = 0; i < n; i++) {
    cin >> (a[i]);
  }
  int ze, neg, pos;
  vector<int> used(n);
  ze = neg = 0;
  pos = -1;
  for (__typeof(0) i = 0; i < n; i++) {
    if (a[i] == 0) {
      used[i] = 1;
      ++ze;
    }
    if (a[i] < 0) {
      ++neg;
      if (pos == -1 || abs(a[pos]) > abs(a[i])) pos = i;
    }
  }
  if (neg & 1) used[pos] = 1;
  if (ze == n || (ze == n - 1 && neg)) {
    for (__typeof(0) i = 0; i < n - 1; i++) {
      cout << (1) << " ", cout << (i + 1) << " ", cout << (i + 2) << " ";
      cout << "\n";
    }
    return 0;
  }
  int idx = -1;
  for (__typeof(0) i = 0; i < n; i++) {
    if (used[i]) {
      if (idx != -1)
        cout << (1) << " ", cout << (idx + 1) << " ", cout << (i + 1) << " ",
            cout << "\n";
      ;
      idx = i;
    }
  }
  if (idx != -1) cout << (2) << " ", cout << (idx + 1) << " ", cout << "\n";
  ;
  idx = -1;
  for (__typeof(0) i = 0; i < n; i++) {
    if (!used[i]) {
      if (idx != -1)
        cout << (1) << " ", cout << (idx + 1) << " ", cout << (i + 1) << " ",
            cout << "\n";
      ;
      idx = i;
    }
  }
  return 0;
}
