public String nextWord() {
            while (i < line.length() && !isRussian(line.charAt(i)) && !isEnglish(line.charAt(i))) {
                ++i;
            }
            if (i == line.length()) {
                return null;
            }
            int start = i;
            boolean rus = isRussian(line.charAt(i));
            while (i < line.length() && (rus ? isRussian(line.charAt(i)) : isEnglish(line.charAt(i)))) {
                ++i;
            }
            return line.substring(start, i);

        }