Task: Program Execution
Input (English): 5, 10, ['R', '1151', '3729', '8833', '5711', 'x', 'C', 'B', '2535', 'm', 'Q', '8537', '9725', 'w', 'A', '1243', 'i', '6323', '1429', '5039', 'w', 'r', '4405', 'w', '4975', 'P']
Output (English): 5711, A, 4975