Task: Program Execution
Input (English): n, G, 4759, 2613, 6897, 6777, J, d, Y, 1181, 6087, 1187
Output (English): 14, 7, 4759, 2613, 6897, 6777, 10, 4, 25, 1181, 6087, 1187