#include <bits/stdc++.h>
using namespace std;
namespace whatever {
int readu() {
  char ch = getchar();
  while (!isdigit(ch)) ch = getchar();
  int value = ch - '0';
  ch = getchar();
  while (isdigit(ch)) {
    value = value * 10 + ch - '0';
    ch = getchar();
  }
  return value;
}
int reads() {
  char ch = getchar();
  while (!isdigit(ch) && ch != '-') ch = getchar();
  int sign = 1;
  if (ch == '-') {
    sign = -1;
    ch = getchar();
  }
  int value = ch - '0';
  ch = getchar();
  while (isdigit(ch)) {
    value = value * 10 + ch - '0';
    ch = getchar();
  }
  return value * sign;
}
void writeu(int n) {
  if (n < 10)
    putchar(n + '0');
  else {
    writeu(n / 10);
    putchar(n % 10 + '0');
  }
}
void run() {
  int n = readu();
  vector<int> a;
  a.push_back(2333);
  int negative_cnt = 0;
  int zero_cnt = 0;
  int positive_cnt = 0;
  for (int i = 0; i < n; ++i) {
    int x = reads();
    if (x < 0)
      ++negative_cnt;
    else if (x == 0)
      ++zero_cnt;
    else
      ++positive_cnt;
    a.push_back(x);
  }
  cerr << "negative_cnt: " << negative_cnt << endl;
  cerr << "zero_cnt: " << zero_cnt << endl;
  cerr << "positive_cnt: " << positive_cnt << endl;
  if (negative_cnt % 2 == 0) {
    if (zero_cnt == 0 || zero_cnt == n) {
      for (int i = 1; i < n; ++i) {
        writeu(1);
        putchar(' ');
        writeu(i);
        putchar(' ');
        writeu(i + 1);
        putchar('\n');
      }
    } else {
      int last_zero = 0;
      int last_non_zero = 0;
      for (int i = 1; i <= n; ++i)
        if (a.at(i) != 0) {
          if (last_non_zero != 0) {
            writeu(1);
            putchar(' ');
            writeu(last_non_zero);
            putchar(' ');
            writeu(i);
            putchar('\n');
          }
          last_non_zero = i;
        } else {
          if (last_zero != 0) {
            writeu(1);
            putchar(' ');
            writeu(last_zero);
            putchar(' ');
            writeu(i);
            putchar('\n');
          }
          last_zero = i;
        }
      writeu(2);
      putchar(' ');
      writeu(last_zero);
      putchar('\n');
    }
  } else {
    if (zero_cnt == n - 1) {
      for (int i = 1; i < n; ++i) {
        writeu(1);
        putchar(' ');
        writeu(i);
        putchar(' ');
        writeu(i + 1);
        putchar('\n');
      }
    } else {
      int excluded_negative = 0;
      for (int i = 1; i <= n; ++i)
        if (a.at(i) < 0) {
          if (excluded_negative == 0 || -a.at(excluded_negative) > -a.at(i))
            excluded_negative = i;
        }
      int last_excluded = 0;
      int last_included = 0;
      for (int i = 1; i <= n; ++i)
        if (i != excluded_negative && a.at(i) != 0) {
          if (last_included != 0) {
            writeu(1);
            putchar(' ');
            writeu(last_included);
            putchar(' ');
            writeu(i);
            putchar('\n');
          }
          last_included = i;
        } else {
          if (last_excluded != 0) {
            writeu(1);
            putchar(' ');
            writeu(last_excluded);
            putchar(' ');
            writeu(i);
            putchar('\n');
          }
          last_excluded = i;
        }
      writeu(2);
      putchar(' ');
      writeu(last_excluded);
      putchar('\n');
    }
  }
}
}  // namespace whatever
int main() { whatever::run(); }
