#include <bits/stdc++.h>
using namespace std;
long long get_num() {
  long long num = 0;
  char c;
  bool flag = false;
  while ((c = getchar()) == ' ' || c == '\r' || c == '\n')
    ;
  if (c == '-')
    flag = true;
  else
    num = c - '0';
  while (isdigit(c = getchar())) num = num * 10 + c - '0';
  return (flag ? -1 : 1) * num;
}
const int maxn = 2e5 + 5;
int n;
struct ccp {
  long long v;
  int id;
} a[maxn];
bool cmp(ccp b, ccp c) { return (b.v < c.v || (b.v == c.v && b.id < c.id)); }
int cnt;
int nxt;
int postive, unpos, zero;
bool vis[maxn];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    a[i].v = get_num();
    if (a[i].v < 0)
      unpos++;
    else if (a[i].v > 0)
      postive++;
    else if (a[i].v == 0)
      zero++;
    a[i].id = i;
  }
  memset(vis, 0, sizeof(vis));
  sort(a + 1, a + 1 + n, cmp);
  if (zero > 0 && unpos % 2) {
    for (int i = 0; i < zero; ++i) {
      cnt++;
      printf("1 %d %d\n", a[unpos + i].id, a[unpos + i + 1].id);
      vis[a[unpos + i].id] = true;
    }
    if (cnt == n - 1) return 0;
    cnt++;
    vis[a[unpos + zero].id] = true;
    printf("2 %d\n", a[unpos + zero].id);
  } else if (zero > 0 && unpos % 2 == 0) {
    for (int i = 1; i < zero; ++i) {
      cnt++;
      printf("1 %d %d\n", a[unpos + i].id, a[unpos + i + 1].id);
      vis[a[unpos + i].id] = true;
    }
    if (cnt == n - 1) return 0;
    cnt++;
    vis[a[unpos + zero].id] = true;
    printf("2 %d\n", a[unpos + zero].id);
  } else if (zero == 0 && unpos % 2) {
    cnt++;
    printf("2 %d\n", a[unpos].id);
    vis[a[unpos].id] = true;
  }
  if (cnt == n - 1) return 0;
  for (int i = 1; i <= n; ++i) {
    if (!vis[a[i].id]) {
      nxt = i;
      break;
    }
  }
  while (cnt < n - 1) {
    int u = nxt;
    while (vis[a[nxt + 1].id]) nxt++;
    nxt++;
    if (a[u].id > a[nxt].id) swap(a[u], a[nxt]);
    vis[a[u].id] = true;
    printf("1 %d %d\n", a[u].id, a[nxt].id);
    cnt++;
  }
  return 0;
}
