Task: Program Execution
Input (English): p, Q, X, Z
Output (English): -1