#include <bits/stdc++.h>
using namespace std;
struct node {
  int a, p;
};
vector<node> zheng, fu, ling;
bool cmp(node a, node b) { return a.a < b.a; }
int main() {
  int n;
  scanf("%d", &n);
  node t;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &t.a);
    t.p = i;
    if (t.a > 0) {
      zheng.push_back(t);
    } else if (t.a < 0) {
      fu.push_back(t);
    } else {
      ling.push_back(t);
    }
  }
  sort(fu.begin(), fu.end(), cmp);
  int first_p = 0, second_p = 0;
  if (!zheng.empty()) {
    first_p = zheng[0].p;
    for (int i = 1; i < zheng.size(); ++i) {
      printf("1 %d %d\n", zheng[i].p, first_p);
    }
  }
  if (!first_p && fu.size() > 1) {
    first_p = fu[0].p;
  }
  int end;
  if (fu.size() % 2) {
    end = fu.size() - 1;
    second_p = fu[fu.size() - 1].p;
  } else {
    end = fu.size();
  }
  for (int i = 0; i < end; ++i) {
    if (fu[i].p != first_p) {
      printf("1 %d %d\n", fu[i].p, first_p);
    }
  }
  if (!second_p && !ling.empty()) {
    second_p = ling[0].p;
  }
  for (int i = 0; i < ling.size(); ++i) {
    if (ling[i].p != second_p) {
      printf("1 %d %d\n", ling[i].p, second_p);
    }
  }
  if (first_p && second_p) {
    printf("2 %d\n", second_p);
  }
  return 0;
}
