#include <bits/stdc++.h>
using namespace std;
const long long N = (long long)1e6 + 6, mod = (long long)0;
long long a[N];
long long ml, mr, sl[N], sr[N];
pair<long long, long long> pl[N], pr[N];
long long cmp(long long first, long long second) {
  return a[first] < a[second];
}
long long solve() {
  for (long long j = 0; j < ml; ++j) sl[j + 1] = (sl[j] + pl[j].first);
  for (long long j = 0; j < mr; ++j) sr[j + 1] = (sr[j] + pr[j].first);
  long long pt = 0, flag = 0;
  for (long long j = 1; j < mr + 1; ++j) {
    while (pt < ml + 1 && sl[pt] < sr[j]) ++pt;
    if (pt != ml + 1 && sl[pt] == sr[j]) {
      cout << j + pt << '\n';
      for (long long i = 0; i < j; ++i) cout << pr[i].second + 1 << ' ';
      for (long long i = 0; i < pt; ++i) cout << pl[i].second + 1 << ' ';
      cout << '\n';
      return 1;
    }
  }
  return 0;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long tc;
  cin >> tc;
  while (tc--) {
    long long n;
    cin >> n;
    ml = mr = 0;
    long long pos0 = -1;
    for (long long j = 0; j < n; ++j) {
      cin >> a[j];
    }
    if (n <= 10) {
      for (long long mask = 1; mask < 1 << n; ++mask) {
        long long sum = 0;
        for (long long j = 0; j < n; ++j)
          if (mask >> j & 1) sum += a[j];
        if (sum == 0) {
          cout << (__builtin_popcount(mask)) << '\n';
          for (long long j = 0; j < n; ++j)
            if (mask >> j & 1) cout << j + 1 << ' ';
          cout << '\n';
          break;
        }
      }
      continue;
    }
    for (long long j = 0; j < n; ++j) {
      if (a[j] == 0) {
        pos0 = j;
      } else if (a[j] < 0) {
        pl[ml++] = make_pair(-a[j], j);
        a[j] = -a[j];
      } else {
        pr[mr++] = make_pair(a[j], j);
      }
    }
    if (pos0 >= 0) {
      cout << 1 << '\n' << pos0 + 1 << '\n';
      continue;
    }
    if (!solve()) {
      if (!solve()) {
        reverse(pr, pr + mr);
        if (!solve()) {
          reverse(pl, pl + ml);
          if (!solve()) {
            reverse(pr, pr + mr);
            if (!solve()) {
              sort(pl, pl + ml);
              sort(pr, pr + mr);
              if (!solve()) {
                reverse(pr, pr + mr);
                if (!solve()) {
                  reverse(pl, pl + ml);
                  if (!solve()) {
                    reverse(pr, pr + mr);
                    while (!solve()) {
                      random_shuffle(pl, pl + ml);
                      random_shuffle(pr, pr + mr);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
