Frequent Words Problem