local DBG = false
function dbgpr(...)
    if DBG then
        io.write("[dbg]")
        print(...)
    end
end

function dbgpr_t(tbl)
    if DBG then
        dbgpr(tbl)
        io.write("[dbg]")
        for i,v in ipairs(tbl) do
            io.write(i)
            io.write(":")
            io.write(tostring(v))
            io.write(" ")
        end
        print("")
    end
end

function dbgpr_tp(tbl)
    if DBG then
        dbgpr(tbl)
        io.write("[dbg]")
        for i,v in pairs(tbl) do
            io.write(i)
            io.write(":")
            io.write(tostring(v))
            io.write(" ")
        end
        print("")
    end
end

------------------------------------
local MOD = 1000000007
local AA, ZZ = 97, 122
local alpha_count = {}
for i=AA,ZZ,1 do
    alpha_count[i] = 0
end
local N = io.read("n", "l")
local S = io.read("l")
local s_tbl = {string.byte(S, 1, #S)}
for _,v in ipairs(s_tbl) do
    alpha_count[v] = alpha_count[v] + 1
end
dbgpr_tp(alpha_count)

local answer = 1
for i=AA,ZZ,1 do
    local place_cnt = alpha_count[i]
    if place_cnt == 0 then
    elseif place_cnt == 1 then
        answer = (answer * 2) % MOD
    else
        -- place_cnt >= 2
        local alphai_combs = 1 + place_cnt
        answer = (answer * alphai_combs) % MOD
    end
end
answer = (answer - 1) % MOD
print(answer)