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

1
2
3
4
5
6
7
8
9
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] = min(x,a[t])
if min(a) == INF: print("#")
else:print(min(a))