#include <bits/stdc++.h>
using namespace std;
const int maxn = 200050;
const long long INF = (1LL << 62) - 1;
const double eps = 1e-8;
int n;
long long a[maxn];
vector<int> v;
bool flag[maxn];
int main() {
  scanf("%d", &n);
  int num = 0;
  memset(flag, 0, sizeof(flag));
  v.clear();
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", &a[i]);
    if (a[i] < 0)
      num++;
    else if (a[i] == 0)
      v.push_back(i);
  }
  int cnt = 0;
  int tmp = 0;
  if (num % 2 == 1) {
    long long maxx = -INF;
    for (int i = n; i >= 1; i--) {
      if (a[i] < 0 && a[i] > maxx) {
        tmp = i;
        maxx = a[i];
      }
    }
  }
  if (tmp) v.push_back(tmp);
  int len = v.size();
  for (int i = 0; i < len - 1; i++) {
    printf("1 %d %d\n", v[i], v[i + 1]), cnt++;
    flag[v[i]] = 1;
  }
  if (len && cnt < n - 1) printf("2 %d\n", v[len - 1]), flag[v[len - 1]] = 1;
  v.clear();
  for (int i = 1; i <= n; i++) {
    if (!flag[i]) v.push_back(i);
  }
  len = v.size();
  for (int i = 0; i < len - 1; i++) printf("1 %d %d\n", v[i], v[i + 1]);
  return 0;
}
