#include <bits/stdc++.h>
using namespace std;
long long n;
void display(vector<long long> pos, vector<long long> neg,
             vector<long long> zer) {
  if (zer.size()) {
    for (long long i = 0; i < zer.size() - 1; i++)
      cout << 1 << " " << zer[i] << " " << zer[i + 1] << endl;
    if (zer.size() != n) cout << 2 << " " << zer[zer.size() - 1] << endl;
  }
  if (pos.size())
    for (long long i = 0; i < pos.size() - 1; i++)
      cout << 1 << " " << pos[i] << " " << pos[i + 1] << endl;
  if (neg.size())
    for (long long i = 0; i < neg.size() - 1; i++)
      cout << 1 << " " << neg[i] << " " << neg[i + 1] << endl;
  if (pos.size() && neg.size())
    cout << 1 << " " << pos[pos.size() - 1] << " " << neg[neg.size() - 1]
         << endl;
}
void display1(vector<long long> pos, vector<long long> neg,
              vector<long long> zer, long long posi) {
  if (zer.size()) {
    for (long long i = 0; i < zer.size() - 1; i++)
      cout << 1 << " " << zer[i] << " " << zer[i + 1] << endl;
    cout << 1 << " " << zer[zer.size() - 1] << " " << posi << endl;
    if (zer.size() != n - 1) cout << 2 << " " << posi << endl;
  }
  if (pos.size())
    for (long long i = 0; i < pos.size() - 1; i++)
      cout << 1 << " " << pos[i] << " " << pos[i + 1] << endl;
  if (neg.size())
    for (long long i = 0; i < neg.size() - 1; i++)
      cout << 1 << " " << neg[i] << " " << neg[i + 1] << endl;
  if (pos.size() && neg.size())
    cout << 1 << " " << pos[pos.size() - 1] << " " << neg[neg.size() - 1]
         << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  cin >> n;
  vector<long long> arr(n);
  vector<long long> pos, neg, zer;
  for (long long i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] > 0)
      pos.push_back(i + 1);
    else if (arr[i] < 0)
      neg.push_back(i + 1);
    else
      zer.push_back(i + 1);
  }
  if (neg.size() % 2) {
    long long maxneg = -100000000000000, posi = -1, ansi = -1;
    for (long long i = 0; i < neg.size(); i++)
      if (arr[neg[i] - 1] > maxneg) {
        maxneg = arr[neg[i] - 1];
        posi = i;
        ansi = neg[i];
      }
    neg.erase(neg.begin() + posi);
    if (zer.size()) {
      display1(pos, neg, zer, ansi);
    } else {
      cout << 2 << " " << ansi << endl;
      display(pos, neg, zer);
    }
  } else {
    display(pos, neg, zer);
  }
  return 0;
}
