main(){long long x=getchar()&1?360349011880:383975481642;for(;x;x/=3)printf("%c\n","01_"[x%3]);}