Task: Program Execution
Input (English): 3, 7, ['J', 'S', 'g', 'W', '471', '783', 'm']
Output (English): m783471Wg