public static String generateName() {
        String templates[] = {
                "Cvc",
                "Cvcc",
                "Ccvcv Vc'Ccvvcv",
                "Ccvcvc CvcCcvccvc",
                "Ccvcvcvcvvc",
                "Ccvcccvcc",
                "Cvccvc",
                "Cvcvc",
                "Cvcccvc",
                "Cvcccc",
                "Vcvcvvc",
                "Vcvcv",
                "Cvcn",
                "Cvcnn",
                "CnC",
                "Cvcvccvcvv",
                "Cvccvc",
                "Cvcvc",
                "Cvcccvc",
                "Cvc",
                "Cvcc",
        };
        String consonants = "bcdfghijklmnpqrstvwxyz";
        String vowels = "aeiouy";
        String numbers = "123456789";

        String template = templates[(int) (Math.random() * templates.length)];
        String result = "";
        for (char ch : template.toCharArray()) {
            if (ch == 'C') {
                result += Character.toUpperCase(randChar(consonants));
            } else if (ch == 'c') {
                result += randChar(consonants);
            } else if (ch == 'V') {
                result += Character.toUpperCase(randChar(vowels));
            } else if (ch == 'v') {
                result += randChar(vowels);
            } else if (ch == 'n') {
                result += randChar(numbers);
            } else {
                result += ch;
            }
        }
        return result;
    }