(while:prn:reduce(rfn f(x y)(if(isa x'fn)x.y(is"."x)(fn(z)[f y(f z _)])`(,x,y)))(tokens:readline))