#include <bits/stdc++.h>
using namespace std;
map<long long, long long> vis;
int main() {
  int n;
  cin >> n;
  long long a[n];
  long long mx = -1e9 - 55;
  int c = 0, idx = -2;
  vector<int> del;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] < 0) {
      c++;
      if (mx < a[i]) idx = i;
      mx = max(mx, a[i]);
    } else if (a[i] == 0) {
      del.push_back(i + 1);
      vis[i + 1] = true;
    }
  }
  if (c & 1) {
    del.push_back(idx + 1);
    vis[idx + 1] = true;
  }
  int v = del.size();
  for (int i = 0; i < v - 1; i++) {
    cout << 1 << " " << del[i] << " " << del[i + 1] << "\n";
  }
  if (del.size() != n and del.size())
    cout << 2 << " " << del[del.size() - 1] << "\n";
  int id = 1;
  while (vis[id]) id++;
  for (int i = id; i < n; i++) {
    if (!vis[i + 1]) {
      cout << 1 << " " << id << " " << i + 1 << "\n";
      id = i + 1;
    }
  }
  return 0;
}
