#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, arr[200009];
  vector<pair<long long, long long>> vvz, vvn, vvp;
  long long pos = 0, neg = 0, zero = 0;
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> arr[i];
    if (arr[i] > 0) {
      vvp.push_back(make_pair(arr[i], i));
      pos++;
    }
    if (arr[i] == 0) {
      vvz.push_back(make_pair(arr[i], i));
      zero++;
    }
    if (arr[i] < 0) {
      vvn.push_back(make_pair(arr[i], i));
      neg++;
    }
  }
  sort(vvn.rbegin(), vvn.rend());
  sort(vvz.rbegin(), vvz.rend());
  sort(vvp.rbegin(), vvp.rend());
  if (pos and neg and zero) {
    while (vvz.size() > 1) {
      cout << 1 << " " << vvz[vvz.size() - 1].second << " "
           << vvz[vvz.size() - 2].second << '\n';
      vvz.pop_back();
    }
    if (neg % 2 == 0) {
      cout << 2 << " " << vvz[0].second << '\n';
      while (vvn.size() > 1) {
        cout << 1 << " " << vvn[vvn.size() - 1].second << " "
             << vvn[vvn.size() - 2].second << '\n';
        vvn.pop_back();
      }
      while (vvp.size() > 1) {
        cout << 1 << " " << vvp[vvp.size() - 1].second << " "
             << vvp[vvp.size() - 2].second << '\n';
        vvp.pop_back();
      }
      cout << 1 << " " << vvp[0].second << " " << vvn[0].second;
    } else {
      cout << 1 << " " << vvz[0].second << " " << vvn[0].second << '\n';
      cout << 2 << " " << vvn[0].second << '\n';
      while (vvn.size() > 2) {
        cout << 1 << " " << vvn[vvn.size() - 1].second << " "
             << vvn[vvn.size() - 2].second << '\n';
        vvn.pop_back();
      }
      while (vvp.size() > 1) {
        cout << 1 << " " << vvp[vvp.size() - 1].second << " "
             << vvp[vvp.size() - 2].second << '\n';
        vvp.pop_back();
      }
      if (neg != 1) {
        cout << 1 << " " << vvp[0].second << " " << vvn[1].second;
      }
    }
  } else if (zero and neg) {
    while (vvz.size() > 1) {
      cout << 1 << " " << vvz[vvz.size() - 1].second << " "
           << vvz[vvz.size() - 2].second << '\n';
      vvz.pop_back();
    }
    if (neg % 2 == 0) {
      cout << 2 << " " << vvz[0].second << '\n';
      while (vvn.size() > 1) {
        cout << 1 << " " << vvn[vvn.size() - 1].second << " "
             << vvn[vvn.size() - 2].second << '\n';
        vvn.pop_back();
      }
    } else {
      cout << 1 << " " << vvz[0].second << " " << vvn[0].second << '\n';
      if (neg != 1) {
        cout << 2 << " " << vvn[0].second << '\n';
        while (vvn.size() > 2) {
          cout << 1 << " " << vvn[vvn.size() - 1].second << " "
               << vvn[vvn.size() - 2].second << '\n';
          vvn.pop_back();
        }
      }
    }
  } else if (pos and zero) {
    while (vvz.size() > 1) {
      cout << 1 << " " << vvz[vvz.size() - 1].second << " "
           << vvz[vvz.size() - 2].second << '\n';
      vvz.pop_back();
    }
    cout << 2 << " " << vvz[0].second << '\n';
    while (vvp.size() > 1) {
      cout << 1 << " " << vvp[vvp.size() - 1].second << " "
           << vvp[vvp.size() - 2].second << '\n';
      vvp.pop_back();
    }
  } else if (pos and neg) {
    if (neg % 2) {
      cout << 2 << " " << vvn[0].second << '\n';
      while (vvn.size() > 2) {
        cout << 1 << " " << vvn[vvn.size() - 1].second << " "
             << vvn[vvn.size() - 2].second << '\n';
        vvn.pop_back();
      }
      while (vvp.size() > 1) {
        cout << 1 << " " << vvp[vvp.size() - 1].second << " "
             << vvp[vvp.size() - 2].second << '\n';
        vvp.pop_back();
      }
      if (neg != 1) {
        cout << 1 << " " << vvp[0].second << " " << vvn[1].second;
      }
    } else {
      while (vvn.size() > 1) {
        cout << 1 << " " << vvn[vvn.size() - 1].second << " "
             << vvn[vvn.size() - 2].second << '\n';
        vvn.pop_back();
      }
      while (vvp.size() > 1) {
        cout << 1 << " " << vvp[vvp.size() - 1].second << " "
             << vvp[vvp.size() - 2].second << '\n';
        vvp.pop_back();
      }
      cout << 1 << " " << vvp[0].second << " " << vvn[0].second;
    }
  } else if (zero) {
    while (vvz.size() > 1) {
      cout << 1 << " " << vvz[vvz.size() - 1].second << " "
           << vvz[vvz.size() - 2].second << '\n';
      vvz.pop_back();
    }
  } else if (neg) {
    if (neg % 2) {
      cout << 2 << " " << vvn[0].second << '\n';
      while (vvn.size() > 2) {
        cout << 1 << " " << vvn[vvn.size() - 1].second << " "
             << vvn[vvn.size() - 2].second << '\n';
        vvn.pop_back();
      }
    } else {
      while (vvn.size() > 1) {
        cout << 1 << " " << vvn[vvn.size() - 1].second << " "
             << vvn[vvn.size() - 2].second << '\n';
        vvn.pop_back();
      }
    }
  } else if (pos) {
    while (vvp.size() > 1) {
      cout << 1 << " " << vvp[vvp.size() - 1].second << " "
           << vvp[vvp.size() - 2].second << '\n';
      vvp.pop_back();
    }
  }
  return 0;
}
