n, k = map(int, input().split())
m = [int(i) for i in input().split()]
m = sorted(m)
m = m[::-1]
print(m[k - 1])

914b395d0786a9e49739df100b2a37547e201ac6
<mask token>

<mask token>
print(m[k - 1])

n, k = map(int, input().split())
m = [int(i) for i in input().split()]
m = sorted(m)
m = m[::-1]
print(m[k - 1])
