while True: try: num = int(input()) list1 = [] if num >=1 and num <=1000: for i in range(num): str1 = input() if len(str1) >= 1 and len(str1) <= 100: list1.append(str1) else: ...