#include <bits/stdc++.h>
const double pi = 3.141592653589793238;
const int MOD1 = 1e9 + 7;
const int MOD2 = 998244353;
const int N = 3e5 + 5;
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n = 0;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  vector<long long> positive;
  vector<long long> negative;
  long long p1 = 0;
  vector<long long> zero;
  long long m = -1e18;
  long long pos = 0;
  for (long long i = 0; i < n; i++) {
    if (a[i] > 0)
      positive.push_back(i + 1);
    else if (a[i] < 0) {
      negative.push_back(i + 1);
      if (a[i] > m) {
        m = a[i];
        pos = i + 1;
        p1 = negative.size();
      }
    } else
      zero.push_back(i + 1);
  }
  long long p = positive.size();
  long long n1 = negative.size();
  long long z = zero.size();
  if (!z) {
    for (long long i = 1; i < p; i++)
      cout << 1 << " " << positive[i - 1] << " " << positive[i] << "\n";
    if (n1 % 2) {
      negative.erase(negative.begin() + p1 - 1);
      cout << 2 << " " << pos << "\n";
      n1--;
    }
    for (long long i = 1; i < n1; i++)
      cout << 1 << " " << negative[i - 1] << " " << negative[i] << "\n";
    if (n1 && p)
      cout << 1 << " " << positive[p - 1] << " " << negative[n1 - 1] << "\n";
  } else {
    for (long long i = 1; i < z; i++)
      cout << 1 << " " << zero[i - 1] << " " << zero[i] << "\n";
    if (!p && !n1) {
    } else if (!n1) {
      for (long long i = 1; i < p; i++)
        cout << 1 << " " << positive[i - 1] << " " << positive[i] << "\n";
      cout << 2 << " " << zero[z - 1] << "\n";
    } else if (!p) {
      if (n1 % 2) {
        cout << 1 << " " << negative[p1 - 1] << " " << zero[z - 1] << "\n";
        negative.erase(negative.begin() + p1 - 1);
        n1--;
        if (n1) cout << 2 << " " << zero[z - 1] << "\n";
      } else
        cout << 2 << " " << zero[z - 1] << '\n';
      for (long long i = 1; i < n1; i++)
        cout << 1 << " " << negative[i - 1] << " " << negative[i] << "\n";
    } else {
      for (long long i = 1; i < p; i++)
        cout << 1 << " " << positive[i - 1] << " " << positive[i] << "\n";
      if (n1 % 2) {
        cout << 1 << " " << negative[p1 - 1] << " " << zero[z - 1] << "\n";
        negative.erase(negative.begin() + p1 - 1);
        cout << 2 << " " << zero[z - 1] << "\n";
        n1--;
        for (long long i = 1; i < n1; i++)
          cout << 1 << " " << negative[i - 1] << " " << negative[i] << "\n";
      } else {
        cout << 2 << " " << zero[z - 1] << "\n";
        for (long long i = 1; i < n1; i++)
          cout << 1 << " " << negative[i - 1] << " " << negative[i] << "\n";
      }
      if (p && n1)
        cout << 1 << " " << positive[p - 1] << " " << negative[n1 - 1] << "\n";
    }
  }
}
