#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int v[N];
vector<int> vis;
vector<int> ans;
int pivo = -1;
bool dfs(int no) {
  if (vis[no]) {
    pivo = no;
    return 1;
  }
  vis[no] = 1;
  if (dfs(v[no])) {
    ans.push_back(no);
    if (no == pivo) return 0;
    return 1;
  }
  return 0;
}
int main() {
  int t;
  cin >> t;
  for (int tt = 0; tt < t; tt++) {
    int n;
    scanf("%d", &n);
    pivo = -1;
    ans.clear();
    vis = vector<int>(n);
    for (int i = 0; i < n; i++) scanf("%d", &v[i]);
    for (int i = 0; i < n; i++) v[i] = i - v[i];
    dfs(0);
    printf("%d\n", (int)(ans).size());
    for (int i = 0; i < ans.size(); i++)
      printf("%d%c", ans[i] + 1, " \n"[i == (int)(ans).size() - 1]);
  }
}
