#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 1e6 + 5;
vector<int> G[N];
bool vis[N];
int f[N];
vector<int> ans;
void dfs(int u, int fa) {
  if (ans.size()) return;
  vis[u] = 1;
  f[u] = fa;
  for (int i = 0; i < G[u].size(); i++) {
    int v = G[u][i];
    if (vis[v] == 0) {
      dfs(v, u);
    } else if (vis[v] == 1) {
      int tmp = u;
      while (tmp != v) {
        ans.push_back(tmp);
        tmp = f[tmp];
      }
      ans.push_back(v);
      return;
    }
  }
  vis[u] = 2;
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    int n;
    int flag = 0;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      G[i].clear();
      vis[i] = 0;
      int x;
      scanf("%d", &x);
      if (!x) flag = i;
      G[i].push_back(i - x);
    }
    if (flag) {
      puts("1");
      printf("%d\n", flag);
      continue;
    }
    ans.clear();
    dfs(1, 0);
    printf("%d\n", ans.size());
    for (auto i : ans) {
      printf("%d ", i);
    }
    puts("");
  }
  return 0;
}
