#include <bits/stdc++.h>
using namespace std;
const int N = 1000005;
int n, a[N], nxt[N], vis[N];
template <typename T>
void read(T &num) {
  num = 0;
  int ch = getchar();
  T fl = 1;
  while (!isdigit(ch) && ch != 45) ch = getchar();
  if (ch == 45) fl = -1, ch = getchar();
  while (isdigit(ch)) {
    num = (num << 3) + (num << 1) + (ch - 48);
    ch = getchar();
  }
  num *= fl;
}
int main() {
  ios::sync_with_stdio(false);
  int T;
  read(T);
  while (T--) {
    read(n);
    int ok = 0;
    for (int i = 1; i <= n; i++) {
      read(a[i]), vis[i] = 0, nxt[i] = i - a[i];
      if (!a[i]) ok = i;
    }
    if (ok) {
      cout << 1 << '\n' << ok << '\n';
      continue;
    }
    int pos = 1;
    vector<int> v, ans;
    while (!vis[pos]) v.push_back(pos), vis[pos] = 1, pos = nxt[pos];
    ans.push_back(pos);
    while (v.back() != pos) ans.push_back(v.back()), v.pop_back();
    cout << ans.size() << '\n';
    for (auto &i : ans) cout << i << ' ';
    cout << '\n';
  }
  return 0;
}
