#include using namespace std; using ll = long long; #define ALL(v) v.begin(),v.end() #define dbg(x) cerr << #x << ": " << (x) << endl; int n; vector a; int main() { cin >> n; a.resize(n); for (int i = 0; i < n; ++i) cin >> a[i]; vector> bases; for (int i = 0; i < n; ++i) { ll y = a[i]; ll mask = 1LL << i; for (auto [b,index] : bases) { if ((b ^ y) < y) { y ^= b; mask ^= index; } } if (y) { bases.emplace_back(y, mask); } else { vector v; for (int j = 0; j <= 60; ++j) if (mask >> j & 1) { v.push_back(j); } cout << v.size() << '\n'; for (int j = 0; j < v.size(); ++j) { cout << v[j]+1 << " \n"[j==v.size()-1]; } return 0; } } cout << -1 << '\n'; }