#include #include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; vector a(n); for(int i = 0; i < n; i++){ cin >> a[i]; } vector> basis; for(int i = 0; i < n; i++){ long long value = a[i]; long long index = (1LL << i); for(auto [base, ind]: basis){ if((value ^ base) < value){ value ^= base; index ^= ind; } } if(value == 0){ vector ans; for(int j = 0; j < 60; j++){ if(index & (1LL << j)){ ans.emplace_back(j + 1); } } cout << ans.size() << endl; for(int b: ans){ cout << b << " "; } cout << endl; return 0; } basis.emplace_back(value, index); } cout << -1 << endl; }