fun main(args: Array<String>) {
    val inputString= readLine()!!
    println("%s".format(inputString.map {
        when {
            !it.isUpperCase() -> it.toUpperCase()
            else -> it.toLowerCase()
        }
    }.joinToString(separator = "")))
}

