127{/s(%stdin)(r)file 30 string readline{def s(?)search 2 index 0 48 1 57{put s length 15 gt{1 1 s{2 index mul add exch 2 xor exch}forall 10}{14 0 s{30 mod 2 index mul add exch 1 sub exch}forall 11}ifelse mod 3 eq{s =}if pop 2 index 0}for}if}repeat