import re while 1:a=range(10);exec re.sub('(\d)',r'a[\1]',raw_input());print ans