Task: Program Execution
Input (English): 2, 3, ['9773', 'S', 'N', '7501', '8599', '7987', 'J', '6915']
Output (English): N, S