#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 10;
const long long M = 2 * N * N + 10;
const long long inf = 1e8 + 7;
const long long Mod = 998244353;
int n;
int a[N];
vector<pair<int, int> > neg;
vector<int> zero;
bool b[N];
int cnt;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", a + i);
  for (int i = 1; i <= n; ++i) {
    if (a[i] == 0)
      zero.push_back(i);
    else if (a[i] < 0)
      neg.push_back(make_pair(a[i], i));
  }
  sort(begin(neg), end(neg));
  if (neg.size() % 2) {
    if (zero.size() == 0) {
      printf("2 %d\n", neg.back().second);
      b[neg.back().second] = 1;
    } else {
      printf("1 %d %d\n", neg.back().second, zero.front());
      b[neg.back().second] = 1;
    }
    cnt = 1;
  }
  if (zero.size()) {
    for (int i = 1; i < zero.size(); ++i) {
      int pos = zero[i];
      b[pos] = 1;
      printf("1 %d %d\n", pos, zero.front());
      cnt++;
    }
    if (cnt < n - 1) {
      b[zero.front()] = 1;
      printf("2 %d\n", zero.front());
    }
  }
  int f = 0;
  for (int i = 1; i <= n; ++i) {
    if (b[i] == 0) {
      f = i;
      break;
    }
  }
  for (int i = f + 1; i <= n; ++i) {
    if (b[i] == 0) printf("1 %d %d\n", i, f);
  }
  return 0;
}
