Task: Program Execution
Input (English): K, n, S, J, G, 129, 2153, 6095, 8267
Output (English): 11, 14, 19, 10, 7, 129, 2153, 6095, 8267