program name
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int64):: i,j,n,cnt(ichar('a'):ichar('z')),ans
    integer(int64),parameter:: md=1000000007
    character(100000):: s
    
    read*, n
    read*, s
    cnt(:) = 1
    do i=1,n
        cnt(ichar(s(i:i)))=cnt(ichar(s(i:i)))+1
    end do

    ans = 1
    do i=ichar('a'),ichar('z')
        ans=mod(ans*cnt(i),md)
    end do
    print'(i0)', ans-1
end program name