while(0<1){for(c<-readLine;i<-0 to 3)print(c-45>>3-i&1);println}