Put the words in the slots such that squares connected by line have same letters.