#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int n, t, a[N], par[N], mark[N], lst, till;
void dfs(int v, int pr) {
  lst = v;
  par[v] = pr, mark[v] = 1;
  if (!mark[v - a[v]])
    dfs(v - a[v], v);
  else
    till = par[v - a[v]];
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> t;
  while (t--) {
    vector<int> ans;
    cin >> n;
    for (int i = 0; i < n; i++) cin >> a[i], mark[i] = 0, par[i] = -1;
    dfs(0, -1);
    int x = lst;
    while (x != till) {
      ans.push_back(x);
      x = par[x];
    }
    cout << ans.size() << "\n";
    for (auto rtr : ans) cout << rtr + 1 << " ";
    cout << "\n";
  }
}
