Problem: A string is called diverse if it contains consecutive (adjacent) letters of the Latin alphabet and each letter occurs exactly once. For example, the following strings are diverse: "fced", "xyz", "r" and "dabcef". The following string are not diverse: "az", "aa", "bad" and "babc". Note that the letters 'a' and 'z' are not adjacent.

Formally, consider positions of all letters in the string in the alphabet. These positions should form contiguous segment, i.e. they should come one by one without any gaps. And all letters in the string should be distinct (duplicates are not allowed).

You are given a sequence of strings. For each string, if it is diverse, print "Yes". Otherwise, print "No".

Input

The first line contains integer n (1 ≤ n ≤ 100), denoting the number of strings to process. The following n lines contains strings, one string per line. Each string contains only lowercase Latin letters, its length is between 1 and 100, inclusive.

Output

Print n lines, one line per a string in the input. The line should contain "Yes" if the corresponding string is diverse and "No" if the corresponding string is not diverse. You can print each letter in any case (upper or lower). For example, "YeS", "no" and "yES" are all acceptable.

Example

Input


8
fced
xyz
r
dabcef
az
aa
bad
babc


Output


Yes
Yes
Yes
Yes
No
No
No
No

Solution (in JAVA):

Solution:
import java.awt.*;
import java.io.*;
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        FastScanner in = new FastScanner();
        Task solver = new Task();
        solver.solve(in);
        in.close();
    }

    static class Task {
        public void solve(FastScanner in) {
            int n = in.nextInt();

            for (int t = 0; t < n; t++) {
                String s = in.nextString();
                int cnt[] = new int[26];
                boolean flag = false;
                for (int i = 0; i < s.length(); i++) {
                    cnt[s.charAt(i) - 'a']++;
                    if (cnt[s.charAt(i) - 'a'] > 1) {
                        System.out.println("No");
                        flag = true;
                        break;
                    }
                }
                if (flag) {
                    continue;
                }
                int first = 26, last = -1;
                for (int i = 0; i < 26; i++) {
                    if (cnt[i] > 0) {
                        first = Math.min(first, i);
                        last = Math.max(last, i);
                    }
                }
                if (last - first + 1 == s.length()) {
                    System.out.println("Yes");
                } else {
                    System.out.println("No");
                }
            }
        }
    }




    // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
    public static class FastScanner {
        final private int BUFFER_SIZE = 4096;
        private InputStreamReader in;
        private char[] buffer;
        private int bufferPointer, bytesRead;

        public FastScanner() {
            in = new InputStreamReader(System.in, StandardCharsets.UTF_8);
            buffer = new char[BUFFER_SIZE];
            bufferPointer = 0;
            bytesRead = 0;
        }

        public FastScanner(String name) {
            try {
                in = new InputStreamReader(new FileInputStream(name), StandardCharsets.UTF_8);
            } catch (Exception e) {
                e.printStackTrace();
            }
            buffer = new char[BUFFER_SIZE];
            bufferPointer = 0;
            bytesRead = 0;
        }

        private void fillBuffer() {
            bufferPointer = 0;
            try {
                while ((bytesRead = in.read(buffer)) == 0) {}
            } catch (Exception e) {
                e.printStackTrace();
            }
            if (bytesRead == -1)
                buffer[0] = 0;
        }

        private char next() {
            if (bufferPointer >= bytesRead) {
                fillBuffer();
            }
            return buffer[bufferPointer++];
        }

        public boolean hasNext() {
            if (bufferPointer >= bytesRead) {
                fillBuffer();
                return (bytesRead != -1);
            }
            return true;
        }

        public String nextLine() {
            try {
                StringBuilder now = new StringBuilder();
                char c;
                while (true) {
                    c = next();
                    if (c == 0 || c == '\n') {
                        break;
                    }
                    now.append(c);
                }
                return now.toString();
            } catch (Exception e) {
                e.printStackTrace();
                return "";
            }
        }

        private int convert(StringBuilder s) {
            try {
                return Integer.parseInt(s.toString());
            } catch (IndexOutOfBoundsException e) {
                e.printStackTrace();
                return 0;
            }
        }

        public ArrayList<Integer> nextLineAsIntegers() {
            try {
                String inp = nextLine();
                StringBuilder now = new StringBuilder();
                ArrayList<Integer> res = new ArrayList<>();

                for (int i = 0; i < inp.length(); i++) {
                    if (!(Character.isDigit(inp.charAt(i)) || inp.charAt(i) == '-')) {
                        if (now.length() > 0) {
                            res.add(convert(now));
                            now.delete(0, now.length());
                        }
                    } else {
                        now.append(inp.charAt(i));
                    }
                }
                if (now.length() > 0) {
                    res.add(convert(now));
                }
                return res;
            } catch (Exception e) {
                e.printStackTrace();
                return new ArrayList<>();
            }
        }

        public ArrayList<String> nextLineAsWords() {
            ArrayList<String> res = new ArrayList<>();

            try {
                StringBuffer now = new StringBuffer();
                String inp = nextLine();

                for (int i = 0; i < inp.length(); i++) {
                    if (!(Character.isLetter(inp.charAt(i)) || Character.getType(inp.charAt(i)) == Character.DASH_PUNCTUATION || inp.charAt(i) == '\'')) {
                        if (now.length() == 0) {
                            continue;
                        }
                        String cur = now.toString().toLowerCase();
                        res.add(cur);
                        now.delete(0, now.length());
                    } else {
                        now.append(inp.charAt(i));
                    }
                }
                if (now.length() > 0) {
                    String cur = now.toString().toLowerCase();
                    res.add(cur);
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
            return res;
        }

        public String nextString() {
            while(true) {
                char c = next();
                if (!Character.isWhitespace(c)) {
                    bufferPointer--;
                    break;
                }
            }
            try {
                StringBuilder now = new StringBuilder();
                char c;
                while (true) {
                    c = next();
                    if (c == 0 || Character.isWhitespace(c)) {
                        break;
                    }
                    now.append(c);
                }
                return now.toString();
            } catch (Exception e) {
                e.printStackTrace();
                return "";
            }
        }

        public int nextInt() {
            try {
                int sign = 1, res = 0;
                char c;
                while (true) {
                    c = next();
                    if (!Character.isWhitespace(c)) {
                        break;
                    }
                }
                if (c == '-') {
                    sign = -1;
                    c = next();
                }
                while (Character.isDigit(c)) {
                    res = res * 10 + (int) (c - '0');
                    c = next();
                }
                bufferPointer--;
                if (sign == 1) {
                    return res;
                } else {
                    return -res;
                }
            } catch(Exception e) {
                e.printStackTrace();
                return 0;
            }
        }

        public long nextLong() {
            try {
                long sign = 1l, res = 0l;
                char c;
                while (true) {
                    c = next();
                    if (!Character.isWhitespace(c)) {
                        break;
                    }
                }
                if (c == '-') {
                    sign = -1l;
                    c = next();
                }
                while (Character.isDigit(c)) {
                    res = res * 10l + (long) (c - '0');
                    c = next();
                }
                bufferPointer--;
                if (sign == 1l) {
                    return res;
                } else {
                    return -res;
                }
            } catch(Exception e) {
                e.printStackTrace();
                return 0l;
            }
        }

        public double nextDouble() {
            double res = 0.0, div = 1.0;
            char c;
            while (true) {
                c = next();
                if (!Character.isWhitespace(c)) {
                    break;
                }
            }
            boolean sign = (c == '-');
            if (sign)
                c = next();

            do {
                res = res * 10.0 + (c - '0');
            }
            while ((c = next()) >= '0' && c <= '9');

            if (c == '.') {
                while ((c = next()) >= '0' && c <= '9') {
                    res += (c - '0') / (div *= 10.0);
                }
            }

            if (sign)
                return -res;
            return res;
        }

        public void close() {
            try {
                in.close();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}