open List let m,p,a=map,print_string,[|" | ";"<->"|]let rec(!)l=m(fun e->p"===")l;p" "and v i l=m(fun e->p a.(e/5 lxor i))l;p" ";i>0&v(i-1)l and($)i l=m(fun e->p a.(min((e+i)mod 5)1))l;p" ";i=1&()= !l||i-1$l and r?(c=input_byte stdin-48)q=c<0&(!q;v 1q;fold_left(fun n e->p[|"===";"=*="|].(n/4*4/n);n+1)(45-length q)q;p" ";5$q)||r(q@[c]);;r[]