#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 100;
int t, n, ans, a[N];
bool mark[N];
void dfs(int v = 0) {
  if (~ans) return;
  mark[v] = true;
  if (mark[v - a[v]])
    ans = v - a[v];
  else
    dfs(v - a[v]);
}
void solve() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    mark[i] = false;
  }
  ans = -1;
  dfs();
  int x = ans;
  vector<int> vec = {ans};
  while (true) {
    x = x - a[x];
    if (x == ans) break;
    vec.push_back(x);
  }
  cout << vec.size() << '\n';
  for (int x : vec) cout << ++x << ' ';
  cout << '\n';
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  cin >> t;
  while (t--) solve();
}
