Task: Program Execution
Input (English): 2, 4, ['7531', '3341', 'p', '3175', 'Q', 'p', 'k', '897', 'R']
Output (English): 6516