Reading word list and generating sorted word list