Task: Program Execution
Input (English): Y, n, P, which, M
Output (English): YnPwhichM