For this Question: Given an input stream of n integers, find the kth largest element for each element in the stream.The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. 
Each test case contains two lines. The first line of each test case contains two space-separated integers n and k. Then in the next line are n space-separated values of the array.

Constraints:
1 <= T <= 100
1 <= n <= 10^3
1 <= K <= n
1 <= stream[i] <= 10^5For each test case, in a new line, print the space separated values denoting the kth largest element at each insertion, if the kth largest element at a particular insertion in the stream doesn't exist print -1.Sample Input:
2
6 4
1 2 3 4 5 6
2 1
3 4

Sample Output:
-1 -1 -1 1 2 3
3 4 

Explanation:
Testcase1:
k = 4
For 1, the 4th largest element doesn't exist so we print -1.
For 2, the 4th largest element doesn't exist so we print -1.
For 3, the 4th largest element doesn't exist so we print -1.
For 4, the 4th largest element is 1 {1, 2, 3, 4}
For 5, the 4th largest element is 2 {2, 3, 4 ,5}
for 6, the 4th largest element is 3 {3, 4, 5}, I have written this Solution Code: from heapq import heappop,heappush,heapify
t = int(input())

for _ in range(t):
	n,k = list(map(int,input().split()))
	arr = list(map(int,input().split()))
	heap = []
	heapify(heap)
	for i in arr:
		heappush(heap,i)
		if len(heap) < k:
			print("-1",end=" ")
		if len(heap) > k:
			heappop(heap)
		if len(heap) == k:
			print(heap[0],end= " ")
	print(), In this Programming Language: Python, Now tell me if this Code is compilable or not?