#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.14159265358979323;
const double EPS = 1e-12;
const int N = 1e6 + 5;
const int mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> v(n + 1);
  vector<pair<long long, long long>> neg, pos, zero;
  for (int i = 1; i <= n; i++) {
    cin >> v[i];
    if (v[i] < 0)
      neg.push_back({v[i], i});
    else if (v[i] > 0)
      pos.push_back({v[i], i});
    else
      zero.push_back({v[i], i});
  }
  sort(neg.begin(), neg.end());
  long long ne = neg.size();
  long long count1 = 0, count2 = 0, count3 = 0;
  if (zero.size() > 1) {
    for (int i = 0; i < zero.size() - 1; i++) {
      cout << 1 << " " << zero[i].second << " " << zero[i + 1].second << endl;
      count1++;
    }
  }
  if (neg.size() > 1) {
    long long p;
    if (neg.size() % 2 == 0)
      p = neg.size();
    else
      p = neg.size() - 1;
    for (int i = 0; i < p - 1; i++) {
      cout << 1 << " " << neg[i].second << " " << neg[i + 1].second << endl;
      count2++;
    }
  }
  if (pos.size() > 1) {
    for (int i = 0; i < pos.size() - 1; i++) {
      cout << 1 << " " << pos[i].second << " " << pos[i + 1].second << endl;
      count3++;
    }
  }
  long long l1 = pos.size(), l2 = zero.size(), l3 = neg.size();
  long long flag = 0;
  long long l = count1 + count2 + count3;
  if (!zero.empty() && !neg.empty() && ne % 2 != 0 && l < n - 1) {
    cout << 1 << " " << zero[l2 - 1].second << " " << neg[l3 - 1].second
         << endl;
    l++;
    flag = 1;
  }
  if (!neg.empty() && ne % 2 != 0 && l < n - 1) {
    cout << 2 << " " << neg[l3 - 1].second << endl;
    l++;
  }
  if (!zero.empty() && l < n - 1 && !flag) {
    cout << 2 << " " << zero[l2 - 1].second << endl;
    l++;
  }
  if (ne % 2 == 0 && !neg.empty() && !pos.empty() && l < n - 1) {
    cout << 1 << " " << neg[l3 - 1].second << " " << pos[l1 - 1].second;
  }
  if (ne % 2 != 0 && !neg.empty() && !pos.empty() && l < n - 1)
    cout << 1 << " " << neg[l3 - 2].second << " " << pos[l1 - 1].second;
  return 0;
}
