Task: Program Execution
Input (English): a, ivory, a, m, Q, U, their, R
Output (English): aivoryamQUtheirR