#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define ff first
#define ss second
#define sorta sort(a,a+n)
#define reversea reverse(a,a+n)
#define all(x) x.begin(), x.end()
#define hurryup ios::sync_with_stdio(0); cin.tie(nullptr); cout.tie(nullptr);
const int INF=1e18;
signed main() {
hurryup;
int t;
cin>>t;
while(t--) {
int n;
cin>>n;
int a[n];
for(int i=0; i<n; i++) cin>>a[i];
vector<int> res;
vector<int> ks;
int curr=0, say=0;
for(int i=0; i<n; i++) {
curr+=a[i];
say++;
if(say==1) continue;
if(curr%2==0) ks.pb(say);
}
for(int k:ks) {
bool ok=true;
for(int i=0; i<=n-k; i++) {
vector<int> v;
int sum=0;
for(int j=0; j<k; j++) {
v.pb(a[i+j]);
sum+=a[i+j];
}
if(sum%2==1) {
ok=false;
break;
}
vector<int> dp(sum+1,0);
dp[0]=1;
for(int x:v) {
for(int c=sum; c>=x; c--) {
if(dp[c-x]==1) {
dp[c]=1;
}
}
}
if(dp[sum/2]!=1) ok=false;
}
if(ok) res.pb(k);
}
cout<<res.size()<<' ';
for(int i:res) cout<<i<<' ';
cout<<'\n';
}
}
// by Maharram Gurbanzada