Task: Program Execution
Input (English): 6, 8, ['p', '7581', 'S', '3769', '837', 'd', 'p', 'p', '6149', '6967']
Output (English): ppd