output_description: Print N lines. The i-th line (1 \leq i \leq N) should contain the maximum
  value among the N-1 elements other than A_i in the sequence.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      A_1
      :
      A_N
attempt: n = int(input())
  t = [int(input()) for i in range(n)]
  for i in range(len(t)):
      s = t
      gomi = s.pop(i)
      print(max(s))
  
problem_description: Statement
  
  You are given a sequence of length N: A_1, A_2, ..., A_N. For each integer i
  between 1 and N (inclusive), answer the following question:
  
    * Find the maximum value among the N-1 elements other than A_i in the sequence.
samples: [{"input": "3\n    1\n    4\n    3", "output": "4\n    3\n    4\n    \n\n  * The maximum value among the two elements other than A_1, that is, A_2 = 4 and A_3 = 3, is 4.\n  * The maximum value among the two elements other than A_2, that is, A_1 = 1 and A_3 = 3, is 3.\n  * The maximum value among the two elements other than A_3, that is, A_1 = 1 and A_2 = 4, is 4.\n\n* * *"}, {"input": "2\n    5\n    5", "output": "5\n    5"}]