S = input() a_cnt,tmp=0,0 for s in S: if s=='a':tmp+=1 else:a_cnt=max(a_cnt,tmp);tmp =0 a_cnt = max(a_cnt,tmp) print('a'*(a_cnt+1))