Task: Program Execution
Input (English): 2, 5, ['t', 'R', '1987', 'K', '1143', 'T', '9833', '7313']
Output (English): 1143K1987R