#include <bits/stdc++.h>
const int N = 1e6 + 10;
const int mod = 19260817;
using namespace std;
int n, a[N], zz = -0x3f3f3f3f, flag, last = 0, cnt;
int32_t main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] != 0) cnt++;
    if (a[i] < 0) flag = 1 - flag, zz = max(zz, a[i]);
  }
  if (cnt == 0) {
    for (int i = 1; i < n; i++) printf("1 %d %d\n", i, i + 1);
    return 0;
  }
  if (cnt == 1) {
    if (flag) {
      for (int i = 1; i <= n; i++)
        if (a[i] == 0) {
          if (last) printf("1 %d %d\n", last, i);
          last = i;
        } else
          printf("2 %d\n", i);
    } else {
      for (int i = 1; i <= n; i++)
        if (a[i] == 0) {
          if (last) printf("1 %d %d\n", last, i);
          last = i;
        }
      printf("2 %d\n", last);
    }
    return 0;
  }
  for (int i = 1; i <= n; i++)
    if (a[i] == 0) {
      if (last) printf("1 %d %d\n", last, i);
      last = i;
    } else if (flag && a[i] == zz) {
      if (last) printf("1 %d %d\n", last, i);
      a[i] = 0;
      last = i;
      flag = 0;
    }
  if (last) printf("2 %d\n", last);
  last = 0;
  for (int i = 1; i <= n; i++)
    if (a[i] != 0) {
      if (last) printf("1 %d %d\n", last, i);
      last = i;
    }
  return 0;
}
