#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 2e5 + 10;
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
long long poww(long long a, long long b, long long md) {
  return (!b ? 1
             : (b & 1 ? a * poww(a * a % md, b / 2, md) % md
                      : poww(a * a % md, b / 2, md) % md));
}
long long a[MAXN];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, cntm = 0, mm = INF, indm = 0, ind0 = 0, indk = 0;
  cin >> n;
  bool d = false;
  for (int i = 1; i <= n; i++) {
    long long x;
    cin >> x;
    a[i] = x;
    if (x == 0) {
      if (ind0 == 0) {
        ind0 = i;
      }
    } else {
      if (x < 0) {
        if (indm == 0) {
          indm = i;
          mm = abs(x);
        } else {
          if (abs(x) < mm) {
            if (indk == 0) {
              indk = indm;
            }
            indm = i;
            mm = abs(x);
          }
          if (indk == 0) {
            indk = i;
          }
          d = true;
        }
        cntm++;
      } else {
        d = true;
        if (indk == 0) {
          indk = i;
        }
      }
    }
  }
  if (!d) {
    for (int i = 2; i <= n; i++) {
      cout << 1 << ' ' << i << ' ' << 1 << '\n';
    }
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] == 0) {
      if (i == ind0) {
        continue;
      } else {
        cout << 1 << ' ' << i << ' ' << ind0 << '\n';
      }
    } else {
      if (i == indm && cntm % 2 == 1) {
        if (ind0 != 0) {
          cout << 1 << ' ' << i << ' ' << ind0 << '\n';
        }
      } else {
        if (i == indk) {
          continue;
        }
        cout << 1 << ' ' << i << ' ' << indk << '\n';
      }
    }
  }
  if (ind0 != 0) {
    cout << 2 << ' ' << ind0 << '\n';
  } else if (cntm % 2 == 1) {
    cout << 2 << ' ' << indm << '\n';
  }
}
