program to merge the dictionaries