#include <conio.h>
#include <stdio.h>
#include <cstdlib>
#include <iostream>
#include <ctime>
#include <math.h>
using namespace std;
void bin(int x, int n){
cout << x << " ";//<< "-" << 2*x << " ";
if (2*x<=n) {bin(2*x,n);}
if (2*x+1 <=n){ bin(2*x + 1,n); }
}
main(){
srand(time(NULL));
bin(1,300);
}