#include <bits/stdc++.h>

using namespace std;

int a[105];
map<int, int> mp;

void solve() {
    mp.clear();
    int n;
    cin >> n;

    for (int i = 0; i < n; i++) {
        cin >> a[i];
        mp[a[i]]++;
    }

    for (int i = 0; i < n; i++) {
        if (mp[a[i]] == 1) {
            cout << i + 1 << " ";
            return;
        }
    }
}

int main() {
    int t;
    cin >> t;
    while(t--) 
        solve();

    return 0;
}