#include<cstdio>
#include<vector>
#include<algorithm>
#include<queue>
#include<iostream>
#include<cstring>
using namespace std;
long long a[1010];
long long b[1010];
int tot;
int n;
bool dfs(int s)
{
memset(b,0,sizeof(b));
tot=0;
for (int i=0;i<=n-1;i++)
{
if ((s>>i)&1==1)
b[++tot]=i+1;
}
if (tot>1)
{
int p=a[b[1]];
for (int i=2;i<=tot;i++)
p^=a[b[i]];
if (!p)
return true;
}
return false;
}
int main()
{
freopen("asm_contribute.in","r",stdin);
freopen("asm_contribute.out","w",stdout);
cin>>n;
for (int i=1;i<=n;i++)
cin>>a[i];
for (int i=1;i<(long long)(2<<n+1);i++)
if (dfs(i))
{
cout<<tot<<endl;
for (int j=1;j<=tot;j++)
cout<<b[j]<<" ";
return 0;
}
}