Task: Program Execution
Input (English): 1, 4, ['Q', '855', '3345', '1829']
Output (English): 6029