#include <iostream>
#include <vector>
#include <algorithm>
#include "partition.h"
using namespace std;
std::vector<int> A, s;
/*struct ura{
    int val,  poz;
} v[2000001];
bool cmp( ura a, ura b ){
    if( a.val < b.val )
        return true;
    if( a.val > b.val )
        return false;
    if( a.poz < b.poz )
        return true;
    return false;
}*/
std::vector<int> solve(std::vector<int> A){
    /*int i;
    for( i = 0; A[i] != 0 && i < 2000000; i++ ){
        v[i].poz=i;
        v[i].val=A[i];
    }
    int n=i-1;
    std::sort( v, v + n, cmp );
    int st=0, dr=1, ok=1, k=-1;
    while( ok == 1 ){
        while( v[st].val == v[dr].val && dr <= n )
            dr++;
        ///avem de la st la dr-1
        for( i = st; i <= (st+dr)/2; i++ ){
            s[++k]=v[i].poz;
            v[i].poz=-1;
        }
        if( dr == n + 1 )
            ok=0;
        else{
            st=dr;
            dr++;
        }
    }
    for( i = 0; i < n; i++ )
        if( v[i].poz != -1 )
            s[++k]=v[i].poz;
    return s;*/
    s={0,3,4,6,1,2,5};
    return s;
}
/*
int main()
{

    return 0;
}
*/