main=interact$map(foldr1(\_->succ)).lines.map(\a->" \nadgjmptw"!!read[a])