#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e6 + 7, mod = 1e9 + 7, MAXN = 1e6 + 7;
const double eps = 1e-9;
const long long inf = 1e18;
mt19937 rnd(time(0));
long long n;
long long a[maxn];
long long to[maxn];
long long used[maxn];
long long pr[maxn];
void solve() {
  cin >> n;
  for (long long i = 0; i < 2 * n; ++i) used[i] = 0;
  for (long long i = 0; i < n; ++i) cin >> a[i];
  for (long long i = 0; i < n; ++i) {
    to[i] = i - a[i];
  }
  long long u = 0;
  long long lst = 0;
  while (!used[u]) {
    used[u] = 1;
    pr[u] = lst;
    lst = u;
    u = to[u];
  }
  vector<long long> ms;
  while (lst != u) {
    ms.push_back(lst);
    lst = pr[lst];
  }
  ms.push_back(lst);
  cout << ms.size() << '\n';
  for (auto v : ms) cout << v + 1 << " ";
  cout << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(20);
  cout << fixed;
  long long t = 1;
  cin >> t;
  for (long long i = 0; i < t; ++i) {
    solve();
  }
  return 0;
}
