#include <bits/stdc++.h>
using namespace std;
using LL = long long;
const int N = 2e6 + 5;
vector<int> g[N];
int a[N], vis[N], sta[N], dis[N], ss;
int dfs(int x, int _dis) {
  vis[x] = 1;
  sta[++ss] = x;
  dis[x] = _dis;
  int t;
  for (auto v : g[x]) {
    if (vis[v]) {
      sta[++ss] = v;
      return _dis - dis[v] + 1;
    } else if (t = dfs(v, _dis + 1))
      return t;
  }
  ss--;
  return 0;
}
int main() {
  int _ = 0;
  for (scanf("%d", &_); _; _--) {
    int n, t;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]), g[i].push_back(i - a[i]);
    for (int i = 1; i <= n; i++) {
      if (t = dfs(i, 0)) {
        printf("%d\n", t);
        for (int j = ss - t + 1; j <= ss; j++) printf("%d ", sta[j]);
        putchar('\n');
        break;
      }
    }
    for (int i = 1; i <= n; i++) g[i].clear(), vis[i] = 0, ss = 0;
  }
  return 0;
}
