#include <bits/stdc++.h>
using namespace std;
long long arr[200000];
int main() {
  int n, cnt = 0, cntz = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%lld", &arr[i]);
    if (arr[i] < 0)
      cnt++;
    else if (arr[i] == 0)
      cntz++;
  }
  if (cnt % 2 == 0 && cntz == 0)
    for (int i = 0; i < n - 1; ++i) printf("1 %d %d\n", i + 1, i + 2);
  else if (cnt % 2 == 1 && cntz == 0) {
    long long mx = (-1e9) - 1, mxi = -1;
    for (int i = 0; i < n; ++i)
      if (arr[i] < 0 && mx < arr[i]) {
        mx = arr[i];
        mxi = i;
      }
    printf("2 %lld\n", mxi + 1);
    vector<int> ans;
    for (int i = 0; i < n; ++i)
      if (i != mxi) ans.push_back(i);
    for (int i = 1; i < ans.size(); ++i)
      printf("1 %d %d\n", ans[i - 1] + 1, ans[i] + 1);
  } else if (cnt % 2 == 0 && cntz >= 1) {
    vector<int> idx;
    for (int i = 0; i < n; ++i)
      if (arr[i] == 0) idx.push_back(i);
    for (int i = 1; i < idx.size(); ++i)
      printf("1 %d %d\n", idx[i - 1] + 1, idx[i] + 1);
    if (idx.size() >= 1 && cntz != n) printf("2 %d\n", idx.back() + 1);
    vector<int> ans;
    for (int i = 0; i < n; ++i)
      if (arr[i] != 0) ans.push_back(i);
    for (int i = 1; i < ans.size(); ++i)
      printf("1 %d %d\n", ans[i - 1] + 1, ans[i] + 1);
  } else if (cnt % 2 == 1 && cntz >= 1) {
    long long mx = (-1e9) - 1, mxi = -1;
    vector<int> idx;
    for (int i = 0; i < n; ++i) {
      if (arr[i] == 0) idx.push_back(i);
      if (arr[i] < 0 && mx < arr[i]) {
        mx = arr[i];
        mxi = i;
      }
    }
    idx.push_back(mxi);
    sort(idx.begin(), idx.end());
    for (int i = 1; i < idx.size(); ++i)
      printf("1 %d %d\n", idx[i - 1] + 1, idx[i] + 1);
    if (idx.size() != n) printf("2 %d\n", idx.back() + 1);
    vector<int> ans;
    for (int i = 0; i < n; ++i)
      if (i != mxi && arr[i] != 0) ans.push_back(i);
    for (int i = 1; i < ans.size(); ++i)
      printf("1 %d %d\n", ans[i - 1] + 1, ans[i] + 1);
  } else {
    for (int i = 0; i < n - 1; ++i) printf("1 %d %d\n", i + 1, i + 2);
  }
  return 0;
}
