#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
ll arr[200005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, prod = 1;
  ll tmp;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] == 0)
      prod = 0;
    else
      prod *= (arr[i] > 0 ? 1 : -1);
  }
  if (prod > 0) {
    for (int i = 0; i < n - 1; i++) {
      cout << 1 << ' ' << i + 1 << ' ' << i + 2 << '\n';
    }
    return 0;
  }
  vector<int> z;
  set<int> avail;
  for (int i = 0; i < n; i++) avail.insert(i);
  for (int i = 0; i < n; i++)
    if (arr[i] == 0) {
      z.push_back(i);
    }
  ll mx = -1e9 - 5, cneg = 0;
  int npos = -1;
  for (int i = 0; i < n; i++)
    if (arr[i] < 0) {
      cneg++;
      if (arr[i] > mx) {
        mx = arr[i];
        npos = i;
      }
    }
  if (prod < 0) {
    cout << 2 << ' ' << npos + 1 << '\n';
    avail.erase(npos);
    while (avail.size() >= 2) {
      cout << 1 << ' ' << *avail.begin() + 1 << ' '
           << *(next(avail.begin())) + 1 << '\n';
      avail.erase(avail.begin());
    }
    return 0;
  }
  if (!(cneg & 1)) {
    for (int i = 0; i < min(n - 2, (int)z.size() - 1); i++) {
      cout << 1 << ' ' << z[i] + 1 << ' ' << z[i + 1] + 1 << '\n';
      avail.erase(z[i]);
    }
    cout << 2 << ' ' << z[min(n - 2, (int)z.size() - 1)] + 1 << '\n';
    avail.erase(z[min(n - 2, (int)z.size() - 1)]);
    while (avail.size() >= 2) {
      cout << 1 << ' ' << *avail.begin() + 1 << ' '
           << *(next(avail.begin())) + 1 << '\n';
      avail.erase(avail.begin());
    }
    return 0;
  }
  vector<int> rem;
  rem.push_back(npos);
  for (int i = 0; i < min(n - 2, (int)z.size()); i++) {
    rem.push_back(z[i]);
  }
  sort(rem.begin(), rem.end());
  for (int i = 0; i < (int)rem.size() - 1; i++) {
    cout << 1 << ' ' << rem[i] + 1 << ' ' << rem[i + 1] + 1 << '\n';
    avail.erase(rem[i]);
  }
  cout << 2 << ' ' << rem.back() + 1 << '\n';
  avail.erase(rem.back());
  while (avail.size() >= 2) {
    cout << 1 << ' ' << *avail.begin() + 1 << ' ' << *(next(avail.begin())) + 1
         << '\n';
    avail.erase(avail.begin());
  }
  return 0;
}
