#include <bits/stdc++.h>
int a[200005];
std::vector<int> v, p, vt;
int main() {
  int n, cnt = 0, cur = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (!a[i]) {
      v.push_back(i);
    } else if (a[i] < 0) {
      ++cnt;
      p.push_back(i);
    } else
      vt.push_back(i);
  }
  if (cnt & 1) {
    int pos = 0;
    for (int i = 0; i < p.size(); i++)
      if (a[p[i]] > a[p[pos]]) pos = i;
    v.push_back(p[pos]);
    for (int i = 0; i < p.size(); i++)
      if (i != pos) vt.push_back(p[i]);
  } else
    for (int i = 0; i < p.size(); i++) vt.push_back(p[i]);
  if (v.size()) {
    for (int i = 0; i < v.size() - 1; i++) {
      printf("1 %d %d\n", v[i], v[i + 1]);
      ++cur;
    }
    if (cur < n - 1) printf("2 %d\n", *(--v.end()));
  }
  if (vt.size())
    for (int i = 0; i < vt.size() - 1; i++)
      printf("1 %d %d\n", vt[i], vt[i + 1]);
  return 0;
}
