Task: Program Execution
Input (English): m, N, missionaries, K, on, A, I, f, G
Output (English): mNmissionariesKonAIfG