The interleaving of two strings and is a string that contains all characters of and and preserves the relative order of the characters in both and . For example, the interleaving of and is . Write a program that prints the interleaving of every given pair of strings.
Define and use a recursive function
interleaving(x,y)
that returns the interleaving of two strings and .
The input consists of several pairs of strings.
Print the interleaving of every given pair of strings.
Input
abc xyz ab xyz abc xy
Output
axbycz axbyz axbyc