#include <bits/stdc++.h>
using namespace std;
long long maxi = LLONG_MIN;
long long mini = LLONG_MAX;
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
long long t, i, j, k, n, temp, flag, ans, m, a[200005];
vector<long long> x;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] == 0) x.push_back(i);
    if (a[i] < 0) m++;
  }
  for (int i = 1; i < x.size(); i++)
    cout << 1 << " " << x[i] << " " << x[0] << "\n";
  if (x.size() == n) return 0;
  if (x.size() + m == n && m == 1) {
    for (int i = 1; i <= n; i++) {
      if (a[i] != 0) {
        cout << 1 << " " << i << " " << x[0] << "\n";
      }
    }
    return 0;
  }
  if (x.size() > 0 && m % 2) {
    for (int i = 1; i <= n; i++)
      if (a[i] < 0) {
        m = i;
        break;
      }
    for (int i = 1; i <= n; i++) {
      if (a[i] > a[m] && a[i] < 0) {
        m = i;
      }
    }
    cout << 1 << " " << m << " " << x[0] << "\n";
    cout << 2 << " " << x[0] << "\n";
    for (int i = 1; i <= n; i++) {
      if (a[i] != 0 && i != m) {
        temp = i;
        break;
      }
    }
    for (int i = 1; i <= n; i++) {
      if (a[i] != 0 && i != m && i != temp)
        cout << 1 << " " << i << " " << temp << "\n";
    }
    return 0;
  }
  if (m % 2) {
    for (int i = 1; i <= n; i++)
      if (a[i] < 0) {
        m = i;
        break;
      }
    for (int i = 1; i <= n; i++) {
      if (a[i] > a[m] && a[i] < 0) {
        m = i;
      }
    }
    cout << 2 << " " << m << "\n";
    if (m == 1) {
      for (int i = 3; i <= n; i++) cout << 1 << " " << i << " " << 2 << "\n";
    } else {
      for (int i = 2; i <= n; i++)
        if (i != m) cout << 1 << " " << i << " " << 1 << "\n";
    }
  } else {
    if (x.size() > 0) {
      cout << 2 << " " << x[0] << "\n";
      for (int i = 1; i <= n; i++)
        if (a[i] != 0) {
          m = i;
          break;
        }
      for (int i = 1; i <= n; i++)
        if (a[i] != 0 && i != m) cout << 1 << " " << i << " " << m << "\n";
    } else
      for (int i = 2; i <= n; i++) cout << 1 << " " << i << " " << 1 << "\n";
  }
  return 0;
}
