#include <bits/stdc++.h>
using namespace std;
const int INF = 3 * 1e7 + 8;
vector <int> solve(vector <int> a) {
    int n = a.size();
    vector <int> cnt(INF, 0), ans, cnt1(INF, 0);
    for(int i = 0; i < n; ++i) cnt[a[i]]++;
    for(int i = 0; i < n; ++i) cnt1[a[i]] = cnt[a[i]] / 2;
    for(int i = 0; i < n; ++i) {
        if(cnt1[a[i]] > 0) {
            ans.push_back(i);
            cnt1[a[i]]--;
        }
    }
    return ans;
}