Task: Program Execution
Input (English): G, 1765, 5047, 6191, K
Output (English): G, K