Task: Program Execution
Input (English): 2, 6, ['g', '1881', 'P', '1757', 'P', 'R', '3207', '6991']
Output (English): 1881P1757PR