Task: Program Execution
Input (English): 2, 2, ['P', 'f', '3187', '4749']
Output (English): 0