Task: Program Execution
Input (English): T, k, 5599, 5091, J, 8847, Q
Output (English): 5599, 5091, 8847