s,*t=input().split() s=list(s) for i,u in enumerate(sorted(list(set(map(int,t))))):del s[u-i] print(''.join(s))