solve word chain problems