#include #include using namespace std; const int MAXN = 1e6+7; bool cnt[MAXN]; int main () { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); freopen("prefmex.in","r",stdin); freopen("prefmex.out","w",stdout); long long n; cin>>n; long long a,j=0; for(int i=0;i>a; cnt[a]=true; while(cnt[j]){ j++; } if(i>0) cout<<" "; cout<