You are trying to encrypt two words by creating their combination, letter by letter. When you run out of characters in the first string, add the remaining letters from the second one. If you run out of characters in the second word, then fill the result string by the remaining characters from the first word.
You need to read two strings from input and combine them with an iterator. Print the resulting string.