Task: Program Execution
Input (English): G, k, X, w
Output (English):