Task: Program Execution
Input (English): 2, 6, ['s', '7421', '5741', '3541', 'b', 'p', '3379', 'N', '3899', 'b', '1939']
Output (English): 16703