#include <bits/stdc++.h>
using namespace std;
bool byRohan(const pair<long long, long long> &a,
             const pair<long long, long long> &b) {
  return ((a.second > b.second) ||
          ((a.second == b.second) && (a.first < b.first)));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, i, inp;
  cin >> n;
  vector<long long> zero, positive;
  vector<pair<long long, long long> > negative;
  for (i = 0; i < n; i++) {
    cin >> inp;
    if (inp == 0) {
      zero.push_back(i + 1);
    } else if (inp < 0) {
      negative.push_back(make_pair(i + 1, inp));
    } else if (inp > 0) {
      positive.push_back(i + 1);
    }
  }
  sort(zero.begin(), zero.end());
  sort(positive.begin(), positive.end());
  sort(negative.begin(), negative.end(), byRohan);
  if (zero.size() >= 1 && negative.size() == 1 && positive.size() == 0) {
    long long z = zero[0];
    if (zero.size() >= 2) {
      for (i = 0; i < zero.size() - 1; i++) {
        cout << 1 << " " << zero[i] << " " << zero[i + 1] << endl;
        z = zero[i + 1];
      }
    }
    cout << 2 << " " << negative[0].first << endl;
    return 0;
  } else if (zero.size() >= 1 && negative.size() == 0 && positive.size() == 0) {
    long long z = zero[0];
    if (zero.size() >= 2) {
      for (i = 0; i < zero.size() - 1; i++) {
        cout << 1 << " " << zero[i] << " " << zero[i + 1] << endl;
        z = zero[i + 1];
      }
    }
    return 0;
  }
  long long pos = -1;
  if (positive.size() >= 2) {
    for (i = 0; i < positive.size() - 1; i++) {
      cout << 1 << " " << positive[i] << " " << positive[i + 1] << endl;
      pos = positive[i + 1];
    }
  } else if (positive.size() == 1) {
    pos = positive[0];
  }
  long long nega = -1;
  vector<long long> negative_now;
  long long start = 0;
  if (negative.size() % 2 != 0) {
    start = 1;
  }
  for (i = start; i < negative.size(); i++) {
    inp = negative[i].first;
    negative_now.push_back(inp);
  }
  sort(negative_now.begin(), negative_now.end());
  if (negative_now.size() >= 2) {
    for (i = 0; i < (negative_now.size() - 1); i++) {
      cout << 1 << " " << negative_now[i] << " " << negative_now[i + 1] << endl;
      nega = negative_now[i + 1];
    }
  }
  if (pos != -1 && nega != -1) {
    long long fir = min(pos, nega);
    long long sec = max(pos, nega);
    cout << 1 << " " << fir << " " << sec << endl;
  }
  if (zero.size() != 0 && (negative.size() % 2) != 0) {
    long long z = zero[0];
    if (zero.size() >= 2) {
      for (i = 0; i < zero.size() - 1; i++) {
        cout << 1 << " " << zero[i] << " " << zero[i + 1] << endl;
        z = zero[i + 1];
      }
    }
    long long fir = min(z, negative[0].first);
    long long sec = max(z, negative[0].first);
    cout << 1 << " " << fir << " " << sec << endl;
    cout << 2 << " " << sec << endl;
  } else if (zero.size() != 0 && (negative.size() % 2) == 0) {
    long long z = zero[0];
    if (zero.size() >= 2) {
      for (i = 0; i < zero.size() - 1; i++) {
        cout << 1 << " " << zero[i] << " " << zero[i + 1] << endl;
        z = zero[i + 1];
      }
    }
    cout << 2 << " " << z << endl;
  } else if (zero.size() == 0 && (negative.size() % 2) != 0) {
    cout << 2 << " " << negative[0].first << endl;
  }
  return 0;
}
