Task: Program Execution
Input (English): n, g, i, 1161, 9681
Output (English): g, i, n