def main(): s = list(input()) a_num = 0 for ch in s: if ch == "a": a_num += 1 ans = "" if a_num > 0: ans += "a" * (a_num + 1) else: ans = "a" print(ans) if __name__ == "__main__": main()