find the longest words can formed by some characters in dic