Word はすべて文字単位で sort, uniq し, それらの word 群を sort, uniq する.