while 1: s=[];l=raw_input().split();d=dict((i,l.count(i)) for i in l) for i in d:s.append(d[i]) s.sort();s.reverse();print ''.join(str(x) for x in s)