class M{static void Main(){for(int i=0;i++<50;){long n=0;foreach(int c in"\n33#")n=(1L>>i%c<