Task: Program Execution
Input (English): T, q, Q, H, C
Output (English): -1