#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  int nol = 0;
  int nech = 0;
  int ind0 = 0;
  int ind1 = 0;
  int minMa = 0;
  int co = 0;
  int beg = 0;
  vector<int> nols;
  cin >> n;
  vector<bool> used(n, false);
  vector<int> arr(n);
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
    if (arr[i] == 0) {
      nol++;
      ind0 = i;
      nols.push_back(i);
    }
    if (arr[i] < 0) {
      nech++;
      if (minMa == 0) {
        minMa = arr[i];
        ind1 = i;
      } else {
        if (minMa < arr[i]) {
          minMa = arr[i];
          ind1 = i;
        }
      }
    }
  }
  if (nol > 1) {
    for (int i = 0; i < nols.size() - 1; ++i) {
      cout << 1 << " " << nols[i] + 1 << " " << nols[i + 1] + 1 << endl;
      co++;
      used[nols[i]] = true;
      while (used[beg]) {
        beg++;
      }
    }
    ind0 = nols[nols.size() - 1];
    nol = 1;
    if (co == n - 1) {
      return 0;
    }
  }
  if (nol == 1) {
    if (nech % 2 == 1) {
      cout << 1 << " " << ind1 + 1 << " " << ind0 + 1 << endl;
      co++;
      used[ind1] = true;
      while (used[beg]) {
        beg++;
      }
      if (co == n - 1) {
        return 0;
      }
    }
    cout << 2 << " " << ind0 + 1 << endl;
    co++;
    if (co == n - 1) {
      return 0;
    }
    used[ind0] = true;
    while (used[beg]) {
      beg++;
    }
    for (int i = beg; i < n - 1; ++i) {
      cout << 1 << " " << i + 1 << " ";
      while (i + 1 < n && used[i + 1]) {
        i++;
      }
      cout << i + 2 << endl;
      co++;
      if (co == n - 1) {
        return 0;
      }
    }
  } else {
    if (nech % 2 == 0) {
      for (int i = beg; i < n - 1; ++i) {
        cout << 1 << " " << i + 1 << " ";
        while (i + 1 < n && used[i + 1]) {
          i++;
        }
        cout << i + 2 << endl;
        co++;
        if (co == n - 1) {
          return 0;
        }
      }
      return 0;
    } else {
      cout << 2 << " " << ind1 + 1 << endl;
      co++;
      if (co == n - 1) {
        return 0;
      }
      used[ind1] = true;
      while (used[beg]) {
        beg++;
      }
      for (int i = beg; i < n - 1; ++i) {
        cout << 1 << " " << i + 1 << " ";
        while (i + 1 < n && used[i + 1]) {
          i++;
        }
        cout << i + 2 << endl;
        co++;
        if (co == n - 1) {
          return 0;
        }
      }
    }
  }
  return 0;
}
