for each(c in readline(s=""))putstr(c=1+c>9?s[c]:c,s=c>'.'?c+s:s)