fun main(args: Array<String>){
    val len = readLine()!!.toInt()
    val s = readLine()!!
    val lc = mutableListOf<Char>()
    for(i in 0..(len - 1)){
        lc.add(s[i])
    }
    lc.sort()
    var ret = 1L
    var i = 0
    while(i < len){
        val c = lc[i]
        var cnt = 1L
        while(++i < len){
            if(lc[i] != c) break
            cnt++
        }
        ret = (ret * (cnt + 1L)) % 1000000007L
    }
    println(ret - 1)
}
