func rev { (var c =STDIN.getc) \\ return()if (c ~~/^[a-z]\z/i) { var r = rev()print creturn r }return c}var (n=0, l=false)while (defined(var c =STDIN.getc)) { var w = (c ~~/^[a-z]\z/i)++n if (w && !l) l = wif (n &1) {print c } else { var r = rev()print(c, r) n =0 l =false }}