Task: Program Execution
Input (English): 2, 4, ['X', 'G', 'Q', '3891', 'h', '3603', 'P']
Output (English): 1983QG