#include <iostream>
#include <vector>
using namespace std;
vector <int> solve( vector <int> v ){
    int i;
    vector <int> ras;
    for( i = v.size() - 1; i >= 0; i-- ){
        if( v[i] != ( 1 << i ) ){
            exit( 1 );
        }
        ras.push_back( i );
    }
    return ras;
}