Task: Program Execution
Input (English): 3, 10, ['L', 'r', 'w', 't', 'T', '1931', 'q', '5649', 'Q', '7981', '6473', '1575', '6915', 'G', 'S', '9503', 'a', 'S', '4387', 'p', 'w']
Output (English): 7981Q5649q1931Ttw