r=a='' while 1:a,r=a and(a/30+~-a/10%3,str(a%10or'A')+r)or(sum(map(int,raw_input(r).split(),[30]*2)),'\n')