#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const long long INFLL = (long long)1e16;
const int MOD = (int)1e9 + 7;
template <typename T>
void out(T x) {
  cout << x << endl;
  exit(0);
}
bool bysec(const pair<int, int> &a, const pair<int, int> &b) {
  return a.second < b.second;
}
const int maxn = (int)2e5 + 5;
int n, a[maxn];
vector<int> zero, pos;
set<pair<int, int> > neg;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  bool deleted = false;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    if (x > 0) {
      pos.push_back(i);
    } else if (x < 0) {
      neg.insert(make_pair(x, i));
    } else {
      zero.push_back(i);
    }
  }
  if (pos.size() == 0 && neg.size() == 1 && zero.size() > 0) {
    if (zero.size() > 1) {
      for (int i = 1; i < (int)zero.size(); i++) {
        cout << "1 " << zero[i] << " " << zero[0] << endl;
      }
    }
    cout << "2 " << neg.begin()->second << endl;
    return 0;
  }
  if (pos.size() == 0 && neg.size() == 0 && zero.size() > 0) {
    if (zero.size() > 1) {
      for (int i = 1; i < (int)zero.size(); i++) {
        cout << "1 " << zero[i] << " " << zero[0] << endl;
      }
    }
    return 0;
  }
  if (zero.size() > 1) {
    for (int i = 1; i < (int)zero.size(); i++) {
      cout << "1 " << zero[i] << " " << zero[0] << endl;
    }
  }
  if (pos.size() > 1) {
    for (int i = 1; i < (int)pos.size(); i++) {
      cout << "1 " << pos[i] << " " << pos[0] << endl;
    }
  }
  if (neg.size() % 2 == 1) {
    int ind = neg.rbegin()->second;
    if (zero.size() > 0) {
      cout << "1 " << ind << " " << zero[0] << endl;
    } else {
      deleted = true;
      cout << "2 " << ind << endl;
    }
  }
  int sz = neg.size();
  if (sz > 1) {
    int end = sz % 2 == 1 ? sz - 1 : sz;
    int f = neg.begin()->second;
    int i = 0;
    for (auto &p : neg) {
      if (i == 0) {
        i++;
        continue;
      }
      if (i == end) break;
      int cur = p.second;
      cout << "1 " << cur << " " << f << endl;
      i++;
    }
  }
  if (zero.size() > 0 && !deleted) {
    cout << "2 " << zero[0] << endl;
    deleted = true;
  }
  if (pos.size() > 0 && sz > 1) {
    cout << "1 " << pos[0] << " " << neg.begin()->second << endl;
  }
  return 0;
}
