#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << '\n';
  err(++it, args...);
}
template <class T1, class T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &a) {
  return os << '(' << a.first << ", " << a.second << ')';
}
template <class T>
ostream &operator<<(ostream &os, const vector<T> &a) {
  os << '[';
  for (unsigned long long i = 0; i < a.size(); i++)
    os << a[i] << (i < a.size() - 1 ? ", " : "");
  os << ']';
  return os;
}
template <class T>
ostream &operator<<(ostream &os, const set<T> &a) {
  os << '{';
  for (typename set<T>::iterator it = a.begin(); it != a.end(); it++) {
    typename set<T>::iterator jt = it;
    os << *it << (++jt != a.end() ? ", " : "");
  }
  os << '}';
  return os;
}
template <class T1, class T2>
ostream &operator<<(ostream &os, map<T1, T2> &a) {
  os << "{\n";
  for (typename map<T1, T2>::iterator it = a.begin(); it != a.end(); it++) {
    typename map<T1, T2>::iterator jt = it;
    os << "  " << it->first << ": " << it->second
       << (++jt != a.end() ? ",\n" : "\n");
  }
  os << '}';
  return os;
}
const long long MAXN = 200100;
long long n;
long long arr[MAXN];
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  long long npos = 0, nneg = 0, nz = 0;
  for (long long i = 0; i <= n - 1; i++) {
    cin >> arr[i];
    if (arr[i] < 0)
      nneg++;
    else if (arr[i] > 0)
      npos++;
    else
      nz++;
  }
  long long sloc = 0;
  if (npos > 0) {
    while (arr[sloc] <= 0) sloc++;
  } else if (nneg > 1) {
    for (long long i = 0; i <= n - 1; i++) {
      if (arr[i] < arr[sloc]) sloc = i;
    }
  } else {
    for (long long i = 0; i <= n - 1; i++) {
      if (arr[i] == 0) sloc = i;
    }
  }
  long long mskip = -1;
  if (nneg % 2 == 1) {
    long long bv = 2e9;
    for (long long i = 0; i <= n - 1; i++) {
      if (i == sloc) continue;
      if (arr[i] >= 0) continue;
      if (-arr[i] < bv) {
        bv = -arr[i];
        mskip = i;
      }
    }
  }
  if (mskip == -1) {
    for (long long i = 0; i <= n - 1; i++) {
      if (arr[i] == 0 && i != sloc) mskip = i;
    }
  }
  for (long long i = 0; i <= n - 1; i++) {
    if (i == sloc) continue;
    if (i == mskip) continue;
    if (arr[i] == 0) {
      cout << "1 " << i + 1 << " " << mskip + 1 << "\n";
    } else
      cout << "1 " << i + 1 << " " << sloc + 1 << "\n";
  }
  if (mskip != -1) cout << "2 " << mskip + 1 << "\n";
}
