Recursively calculates a word chain between two words inputted by the user.