public String outcast(String[] nouns) {
        int[] distances = new int[nouns.length];
        for (int i = 0; i < nouns.length; i++) {
            for (int j = 0; j < nouns.length; j++) {
                if (i == j) {
                    continue;
                }
                distances[i] += wn.distance(nouns[i], nouns[j]);
            }
        }
        int max = 0;
        for (int i = 0; i < nouns.length; i++) {
            if (distances[i] > distances[max]) {
                max = i;
            }
        }
        return nouns[max];
    }