#include <bits/stdc++.h>
using namespace std;
const int N = 1000010;
const int inf = 2147483647;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') x = x * 10ll + ch - '0', ch = getchar();
  return x * f;
}
int fa[N], n, la, ans[N], a[N];
bool v[N];
vector<int> G[N];
void dfs(int x) {
  v[x] = true;
  for (int y : G[x]) {
    if (!v[y])
      fa[y] = x, dfs(y);
    else if (!la) {
      int t = x;
      while (1) {
        ans[++la] = t;
        if (t == y) break;
        t = fa[t];
      }
    }
  }
}
int main() {
  int T = read();
  while (T--) {
    n = read();
    la = 0;
    for (int i = 1; i <= n; i++) G[i].clear(), v[i] = false;
    for (int i = 1; i <= n; i++) {
      int x = i;
      a[i] = read();
      int y = i - a[i];
      G[x].push_back(y);
    }
    dfs(1);
    printf("%d\n", la);
    for (int i = 1; i <= la; i++) printf("%d ", ans[i]);
    puts("");
  }
}
