#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0, nn = 0, nz = 0, j = 0, f = 1, b = INT_MIN;
  cin >> n;
  map<int, vector<int>> m;
  for (int i = 0; i < n; ++i) {
    int x = 0;
    cin >> x;
    m[x].push_back(i);
    if (x < 0) {
      nn++;
      if (x > b) b = x;
    }
    if (x == 0) nz++;
  }
  j = 0;
  if (nz > 1) {
    int l = m[0].size() - 1;
    for (int i = l; i > 0; i--) {
      cout << 1 << " " << m[0][i] + 1 << " " << m[0][i - 1] + 1 << "\n";
      j++, m[0].pop_back(), nz--;
    }
  }
  if (nz == 1) {
    if (nn % 2 == 1) {
      int x = b;
      cout << 1 << " " << m[x][m[x].size() - 1] + 1 << " " << m[0][0] + 1
           << "\n";
      j++, m[x].pop_back(), nn--;
    }
    if (f && j < n - 1) cout << 2 << " " << m[0][0] + 1 << "\n";
    j++, m[0].pop_back(), nz--, f = 0;
  }
  if (nn % 2 == 1) {
    int x = b;
    if (f && j < n - 1) cout << 2 << " " << m[x][m[x].size() - 1] + 1 << "\n";
    j++, m[x].pop_back(), nn--, f = 0;
  }
  int x = -1;
  for (auto& y : m) {
    auto& k = y.second;
    if (k.empty()) continue;
    if (x >= 0) {
      cout << 1 << " " << x + 1 << " " << k[k.size() - 1] + 1 << "\n";
      j++;
    }
    int l = k.size() - 1;
    for (int i = l; i > 0; i--) {
      cout << 1 << " " << k[i] + 1 << " " << k[i - 1] + 1 << "\n";
      j++;
    }
    x = k[0];
  }
  return 0;
}
