Task: Program Execution
Input (English): 5, 7, ['5123', '4235', 'G', 'b', '9881', 'N', '7421']
Output (English): 1247N1889