while True: try: str0 = input() dic, i = {}, 0 while i < len(str0) - ...