#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
int a[maxn], vis[maxn];
int main() {
  int n, p, flag = 0, mark = 0, tot = 0, Min = 1e9 + 7, cur, Max = -1e9 - 7,
            Maxcur;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] == 0)
      vis[i] = 1, mark = 1;
    else if (a[i] < 0) {
      flag++;
      if (a[i] < Min) cur = i;
      Min = min(Min, a[i]);
      if (a[i] > Max) Maxcur = i;
      Max = max(Max, a[i]);
    }
  }
  if (flag % 2) vis[Maxcur] = 1, mark = 1;
  for (int i = 1; i <= n; i++)
    if (vis[i]) {
      p = i;
      break;
    }
  for (int i = p + 1; i <= n; i++)
    if (vis[i]) printf("1 %d %d\n", p, i), p = i, tot++;
  if (tot != n - 1 && mark) printf("2 %d\n", p);
  for (int i = 1; i <= n; i++)
    if (!vis[i]) {
      p = i;
      break;
    }
  for (int i = p + 1; i <= n; i++)
    if (!vis[i]) printf("1 %d %d\n", p, i), p = i;
}
