#include using namespace std; using pii = pair; using ll = long long; using pll = pair; int i = 1; map m; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, q; cin >> n >> q; while (n--) { int x; cin >> x; if (!m.count(x)) { cout << "1 " << i << " " << x << "\n"; m[x] = i++; q--; } cout << "2 " << m[x] << "\n"; q--; } while (q--) cout << "1 1 1\n"; }