#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void dump(const vector<int>& a) {
  for (int i = 0; i < a.size(); i++) {
    cerr << a[i] << ' ';
  }
  cerr << endl;
}
vector<pair<int, int>> factorise(long long m) {
  vector<pair<int, int>> res;
  for (long long i = 2; i * i <= m; i++) {
    if (m % i == 0) {
      int cnt = 0;
      while (m % i == 0) {
        cnt++;
        m /= i;
      }
      res.emplace_back(i, cnt);
    }
  }
  return res;
};
using ll = long long;
ll gcd(ll a, ll b, ll& x, ll& y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  ll x1, y1;
  ll d = gcd(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
bool debug = false;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
const int magic = 3;
const int INF = 1e9;
void solve();
void init();
int main(int argc, char** argv) {
  cout.precision(15);
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t = 1;
  for (int tt = 1; tt <= t; tt++) {
    solve();
  }
  return 0;
}
const int MX = 200500;
int a[MX];
bool used[MX];
void join(int i, int j) {
  cout << "1 " << i + 1 << ' ' << j + 1 << "\n";
  used[i] = true;
}
void out(int n, int pos) {
  if (pos >= 0) {
    used[pos] = true;
  }
  int another = 0;
  while (used[another]) {
    another++;
  }
  if (another == n) {
    return;
  }
  if (pos >= 0) {
    cout << "2 " << pos + 1 << "\n";
  }
  for (int i = another + 1; i < n; i++) {
    if (!used[i]) {
      join(i, another);
    }
  }
}
void solve() {
  int n;
  cin >> n;
  int cnt_neg = 0;
  int neg_pos = -1;
  int zero_pos = -1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 0) {
      if (zero_pos != -1) {
        join(zero_pos, i);
      }
      zero_pos = i;
    }
    if (a[i] < 0) {
      cnt_neg++;
      if (neg_pos == -1 || a[neg_pos] < a[i]) {
        neg_pos = i;
      }
    }
  }
  if (cnt_neg & 1) {
    if (zero_pos == -1) {
      out(n, neg_pos);
      return;
    }
    join(neg_pos, zero_pos);
  }
  out(n, zero_pos);
}
