Task: Program Execution
Input (English): h, q, 287, p
Output (English): 2, 7, 8