s = input() val = 0 for i in s: if i == "a": val += 1 ans = [] for i in range(val+1): ans.append("a") ans = "".join(ans) print(ans)