import sys

input = sys.stdin.readline


# def saymid(num):
#     for i in range(len(numbers)):
#         if numbers[i] > num:
#             numbers.insert(i, num)
#             break
#     else:
#         numbers.append(num)
#     return numbers[len(numbers) // 2 if len(numbers) % 2 == 1 else len(numbers) // 2 - 1]
def saymid():
    return

if __name__ == "__main__":
    N = int(input())
    numbers = []

    for n in range(N):
        print(saymid(int(input())))
