Task: Program Execution
Input (English): 3, 3, ['S', 'X', 'c', 'Q', '9549', 'B', '4615', '8891', '2291', 'm', '715', '4885', '785', 'A', 'a']
Output (English): c, B, 2291, 4885, a