Task: Program Execution
Input (English): 5411, 4701, 8535, 1391, g, N, 1801, U, 8989, V, W, D, 4045, T, R, r, 5797, 3891, 8707, P
Output (English): 5411, 4701, 8535, 1391, 7, 14, 1801, 21, 8989, 22, 23, 4, 4045, 20, 18, 18, 5797, 3891, 8707, 16