#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, neg = 0, z = 0, mx, k, i, j, d;
  cin >> n;
  d = n - 1;
  long long int a[n];
  vector<long long int> v;
  mx = -1e18;
  bool vis[n];
  for (i = 0; i < n; i++) vis[i] = false;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 0) {
      z++;
      v.push_back(i);
    } else if (a[i] < 0) {
      neg++;
      if (mx < a[i]) {
        mx = a[i];
        j = i;
      }
    }
  }
  if (neg % 2 == 1 && z == 0 && d > 0) {
    cout << 2 << " " << j + 1 << endl;
    vis[j] = true;
    d--;
  } else if (neg % 2 == 1 && z != 0 && d > 0) {
    cout << 1 << " " << j + 1 << " " << v[0] + 1 << endl;
    vis[j] = true;
    d--;
  }
  for (i = 1; i < v.size(); i++) {
    if (d > 0) cout << 1 << " " << v[i - 1] + 1 << " " << v[i] + 1 << endl;
    vis[v[i - 1]] = true;
    d--;
  }
  if (z != n && z != 0) {
    if (d > 0) cout << 2 << " " << v[v.size() - 1] + 1 << endl;
    vis[v[v.size() - 1]] = true;
    d--;
  }
  k = 0;
  while (k < n) {
    if (vis[k] == false) {
      for (j = k + 1; j < n; j++) {
        if (vis[j] == false) {
          if (d > 0) {
            cout << 1 << " " << k + 1 << " " << j + 1 << endl;
            d--;
          }
          vis[k] = true;
          k = j;
          break;
        }
      }
      if (j == n) k++;
    } else
      k++;
  }
}
