#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, temp;
  cin >> n;
  vector<pair<int, int> > vec;
  int neg = 0, zer = 0, pos = 0;
  for (int i = 1; i <= n; i++) {
    cin >> temp;
    if (temp < 0)
      neg++;
    else if (temp == 0)
      zer++;
    else
      pos++;
    vec.push_back(make_pair(temp, i));
  }
  int x = vec.size();
  vec.push_back(make_pair(-1000000009, 0));
  sort(vec.begin(), vec.end());
  if (neg % 2 == 1) {
    if (neg == x) {
      for (int i = 1; i <= neg - 2; i++) {
        cout << "1 " << vec[i].second << " " << vec[i + 1].second << "\n";
      }
      cout << "2 " << vec[neg].second << "\n";
    } else {
      for (int i = 1; i <= neg - 2; i++) {
        cout << "1 " << vec[i].second << " " << vec[i + 1].second << "\n";
      }
      for (int i = neg + zer; i > neg; i--) {
        cout << "1 " << vec[i].second << " " << vec[i - 1].second << "\n";
      }
      if (neg >= 3 || pos > 0) cout << "2 " << vec[neg].second << "\n";
      if (zer == 0 && pos == 0) cout << "2 " << vec[neg - 1].second << "\n";
      for (int i = x; i > neg + zer + 1; i--) {
        cout << "1 " << vec[i].second << " " << vec[i - 1].second << "\n";
      }
      if (pos > 0 && neg > 1)
        cout << "1 " << vec[neg - 1].second << " " << vec[neg + zer + 1].second
             << "\n";
    }
  } else {
    for (int i = 1; i <= neg - 1; i++) {
      cout << "1 " << vec[i].second << " " << vec[i + 1].second << "\n";
    }
    for (int i = neg + zer; i > neg + 1; i--) {
      cout << "1 " << vec[i].second << " " << vec[i - 1].second << "\n";
    }
    for (int i = x; i > neg + zer + 1; i--) {
      cout << "1 " << vec[i].second << " " << vec[i - 1].second << "\n";
    }
    if (pos > 0 && neg > 0)
      cout << "1 " << vec[neg].second << " " << vec[neg + zer + 1].second
           << "\n";
    if (zer != 0 && (neg > 0 || pos > 0))
      cout << "2 " << vec[neg + 1].second << "\n";
  }
  return 0;
}
