Task: Program Execution
Input (English): 5, 7, ['W', 'u', 't', 'P', 'J', 'O', 'g']
Output (English): gOJ