#include <iostream>
#include <bitset>
#include <vector>
using namespace std;
typedef long long ll;
const int N=1024;
bitset<50001> dp[N];
void solve()
{
int n;
cin>>n;
vector<int> a(n);
vector<int> pos(n);
for(int i=0;i<n;i++)
{
pos[i]=1;
cin>>a[i];
}
for(int i=0;i<n;i++)
{
dp[i].reset();
dp[i][0]=1;
int tot=0;
for(int j=i;j<n;j++)
{
dp[i]|=(dp[i]<<a[j]);
tot+=a[j];
if(tot%2==0 and pos[j-i] and dp[i][tot/2])
{
}
else{
pos[j-i]=0;
}
}
}
int cnt=0;
for(int i=0;i<n;i++)cnt+=pos[i];
cout<<cnt<<' ';
for(int j=0;j<n;j++)if(pos[j])cout<<j+1<<' ';
cout<<endl;
}
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t;
cin>>t;
while(t--)
{
solve();
}
}