#include <bits/stdc++.h>
#pragma warning(disable : 4996)
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("-ffloat-store")
using namespace std;
clock_t time_p = clock();
void aryanc403() {
  time_p = clock() - time_p;
  cerr << "Time Taken : " << (float)(time_p) / CLOCKS_PER_SEC << "\n";
}
class CMP {
 public:
  bool operator()(long long int a, long long int b) { return !(a <= b); }
};
void add(map<long long int, long long int> &m, long long int x) {
  map<long long int, long long int>::iterator jt;
  jt = m.find(x);
  if (jt == m.end())
    m.insert(make_pair(x, 1));
  else
    jt->second++;
}
void del(map<long long int, long long int> &m, long long int x) {
  map<long long int, long long int>::iterator jt;
  jt = m.find(x);
  if (jt->second == 1)
    m.erase(jt);
  else
    jt->second--;
}
bool cmp(const pair<long long int, long long int> &a,
         const pair<long long int, long long int> &b) {
  return a.first < b.first || (a.first == b.first && a.second < b.second);
}
const long long int INF = 0xFFFFFFFFFFFFFFFL;
const long long int mod = 1000000007L;
long long int T, n, i, m, j, k, in, cnt, l, idx, ln;
vector<long long int> a, z, p;
vector<long long int>::iterator it;
string s;
void prt(vector<long long int> &z, long long int blk) {
  if (z.empty()) return;
  long long int pvr = z[0];
  if (pvr == blk) {
    if ((long long int)z.size() > 1) {
      pvr = z[1];
    } else
      return;
  }
  for (auto &x : z) {
    if (x == pvr || x == blk) continue;
    cout << 1 << " " << x + 1 << " " << pvr + 1 << "\n";
    ln++;
  }
  if (ln < n - 1) {
    cout << 2 << " " << pvr + 1 << "\n";
    ln++;
  }
}
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  idx = -1;
  for (i = 0; i < (n); ++i) {
    cin >> in;
    a.push_back(in);
    if (in == 0) {
      z.push_back(i);
    } else {
      if (in < 0) {
        cnt++;
        if (idx == -1 || abs(a[idx]) > abs(in)) idx = i;
      }
      p.push_back(i);
    }
  }
  if (cnt % 2) {
    z.push_back(idx);
    prt(z, -1);
    prt(p, idx);
  } else {
    prt(z, -1);
    prt(p, -1);
  }
  aryanc403();
  return 0;
}
