#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
int a[maxn];
queue<int> q;
queue<int> m;
int main() {
  int n;
  scanf("%d", &n);
  int fu = 0;
  int maxfu = -0x3f3f3f3f;
  int idfu;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] < 0) {
      fu++;
      if (maxfu < a[i]) {
        maxfu = a[i];
        idfu = i;
      }
    }
  }
  int flag = 0;
  if (fu % 2 != 0) {
    m.push(idfu);
    flag = 1;
  }
  for (int i = 1; i <= n; i++) {
    if (flag && i == idfu) continue;
    if (a[i] == 0)
      m.push(i);
    else
      q.push(i);
  }
  while (m.size() != 0) {
    if (m.size() == 1) {
      if (q.size() == 0)
        return 0;
      else
        printf("2 %d\n", m.front());
      break;
    } else {
      int t1, t2;
      t1 = m.front();
      m.pop();
      t2 = m.front();
      printf("1 %d %d\n", t1, t2);
    }
  }
  if (q.size() < 2) return 0;
  while (q.size() != 1) {
    int t1, t2;
    t1 = q.front();
    q.pop();
    t2 = q.front();
    printf("1 %d %d\n", t1, t2);
  }
}
