int input INF -float inf INF INF INF for in range int input index min

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
n = int(input())
INF = -float('inf')
a = [INF,INF,INF]
for i in range(n):
x = int(input())
t = a.index(min(a))
if x not in a: a[t] = max(x,a[t])
if min(a) == INF: print("#")
else:print(min(a))