#include <bits/stdc++.h>
using namespace std;
int n, nmz = 0, nmm = 0, idmn = 0, hmn = -1e9 - 10, pp = 0, del = 0;
pair<int, int> p[200011];
bool vis[200011];
int main() {
  cin >> n;
  for (int i = 0; i < (int)n; ++i) {
    int a;
    cin >> a;
    p[i] = {a, i + 1};
    if (!a) nmz++;
    if (a < 0) {
      nmm++;
      if (hmn < a) {
        hmn = a;
        idmn = i + 1;
      }
    }
    if (a > 0) pp++;
  }
  if (nmz) {
    pair<int, int> cur;
    int fr = 0;
    for (; fr < n; fr++) {
      if (!p[fr].first) {
        cur = p[fr];
        break;
      }
    }
    for (int i = ++fr; i < n; i++) {
      if (!p[i].first) {
        printf("1 %d %d\n", cur.second, p[i].second);
        vis[cur.second] = 1;
        del++;
        cur = p[i];
      }
    }
    if ((nmm & 1)) {
      if (cur.second > idmn) {
        printf("1 %d %d\n", idmn, cur.second);
        vis[idmn] = 1;
      } else {
        printf("1 %d %d\n", cur.second, idmn);
        vis[cur.second] = 1;
        cur.second = idmn;
      }
      del++;
    }
    if (del + 1 != n) {
      printf("2 %d\n", cur.second);
      vis[cur.second] = 1;
    }
  }
  if ((nmm & 1) && !vis[idmn] && del + 1 != n) {
    printf("2 %d\n", idmn);
    vis[idmn] = 1;
  } else
    hmn = 1e9 + 10;
  pair<int, int> cur;
  int fr = 0;
  for (fr = 0; fr < n; fr++) {
    if (vis[p[fr].second]) continue;
    cur = p[fr];
    break;
  }
  for (int i = ++fr; i < n; i++) {
    if (vis[p[i].second]) continue;
    printf("1 %d %d\n", cur.second, p[i].second);
    cur = p[i];
  }
  return 0;
}
