func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long INF = 501;   const long long DIM = 3e5 + 1;   int in, n, t, a[DIM];   int main() {     ios_base::sync_with_stdio;     cin.tie(0);     cout.tie(0);     in = scanf( %d , &t);     while (t--) {       in = scanf( %d , &n);       set<int> s;       for (int i = 1; i <= n; i++) {         in = scanf( %d , &a[i]);         s.insert(a[i]);       }       if (s.size() == 1)         printf( -1 n );       else {         auto it = s.end();         it--;         for (int i = 1; i <= n; i++) {           if (a[i] == *it &&               ((i > 1 && a[i - 1] != *it) || (i < n && a[i + 1] != *it))) {             printf( %d n , i);             break;           }         }       }     }     return 0;   }   