while True: try: m = int(input()) s = [] for i in range(1, m**3): # 最大基...