import sys def input(): return sys.stdin.readline().strip() def main(): s = input() z = [] noneq = [] for c in s: if ( c == ">" and len(z) > 0 and z[-1] == "=" and len(noneq) > 0 and noneq[-1] == "<" ): while z[-1] == "=": z.pop() z.pop() noneq.pop() else: z.append(c) if c != "=": noneq.append(c) print("".join(z)) if __name__ == "__main__": main()