Task: Program Execution
Input (English): 5, 7, ['p', '5363', '1741', '5029', 'S', '1827', '4995']
Output (English): 49951827S