print("\n".join([s[::-1] for s in iter(input, "***")]))