Task: Program Execution
Input (English): 2, 3, ['5259', '5193', '7649', '6731', '8869', 'M', '4397', '8581', '5291', 'D', 'S', 'P', 'p']
Output (English): 5193, 8869, 8581, S