Task: Program Execution
Input (English): x, 2351, 3741, 8165, M, Q, 8345, 5891, 6489
Output (English): 1, 5, 6