object Acronym {
    fun generate(inpString: String): String{
        val tokenized_sentence = inpString.split(delimiters = ' ').flatMap { it.split('-') }
        val letters = tokenized_sentence.map { grabAcronym(it) }
        return letters.joinToString(separator = "")
    }

    private fun grabAcronym(inpString: String): String{
        if (inpString.first().isUpperCase()){
            if (inpString.all { it.isUpperCase() || !it.isLetter() }){
                return inpString.first().toString()
            }
            else return inpString.filter { it.isUpperCase() }
        }
        else return inpString.first().toUpperCase().toString()
    }
}