Task: Program Execution
Input (English): 3, 7, ['j', '5781', 'B', 'B', '5455', '6997', 'w', '6421', '1729']
Output (English): w, 6997, 5455, B, B