#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int t[n];
  int zero = 0;
  int negative = 0;
  for (int i = 0; i < n; i++) {
    cin >> t[i];
    if (t[i] == 0) zero++;
    if (t[i] < 0) negative++;
  }
  if (negative % 2 == 0) {
    if (zero > 0) {
      int firstzero = 0;
      while (t[firstzero] != 0) firstzero++;
      if (zero > 1) {
        for (int i = firstzero + 1; i < n; i++) {
          if (t[i] == 0)
            cout << 1 << " " << i + 1 << " " << firstzero + 1 << endl;
        }
      }
      if (zero != n) {
        cout << 2 << " " << firstzero + 1 << endl;
        int firstnotzero = 0;
        while (t[firstnotzero] == 0) firstnotzero++;
        for (int i = firstnotzero + 1; i < n; i++) {
          if (t[i] != 0)
            cout << 1 << " " << i + 1 << " " << firstnotzero + 1 << endl;
        }
      }
    } else {
      for (int i = 1; i < n; i++) cout << 1 << " " << i + 1 << " " << 1 << endl;
    }
  } else {
    int minn = 0;
    while (t[minn] >= 0) minn++;
    for (int i = 0; i < n; i++)
      if (t[i] < 0 && t[i] > t[minn]) minn = i;
    if (zero > 0) {
      int firstzero = 0;
      while (t[firstzero] != 0) firstzero++;
      if (zero > 1) {
        for (int i = firstzero + 1; i < n; i++) {
          if (t[i] == 0)
            cout << 1 << " " << i + 1 << " " << firstzero + 1 << endl;
        }
      }
      cout << 1 << " " << minn + 1 << " " << firstzero + 1 << endl;
      if (zero != n - 1) {
        cout << 2 << " " << firstzero + 1 << endl;
        int firstnotzero = 0;
        while (t[firstnotzero] == 0 || firstnotzero == minn) firstnotzero++;
        for (int i = firstnotzero + 1; i < n; i++) {
          if (t[i] != 0 && i != minn)
            cout << 1 << " " << i + 1 << " " << firstnotzero + 1 << endl;
        }
      }
    } else {
      cout << 2 << " " << minn + 1 << endl;
      if (minn != 0) {
        for (int i = 1; i < n; i++)
          if (i != minn) cout << 1 << " " << i + 1 << " " << 1 << endl;
      } else
        for (int i = 2; i < n; i++)
          cout << 1 << " " << i + 1 << " " << 2 << endl;
    }
  }
}
