program main
  implicit none
  character(len=100000) S
  character(len=1),parameter ::alp(26) &
       = (/"a","b","c","d","e","f","g","h","i","j","k","l",&
       "m","n","o","p","q","r","s","t","u","v","w","x","y","z"/)
  integer :: nalp(26) 
  integer :: N
  integer :: i,j
  integer(8) :: out
  
  read(*,*) N
  read(*,*) S
  nalp(:) = 0
  do i = 1,N
     do j =1,26
        if ( alp(j) == S(i:i)) then
           nalp(j) = nalp(j) + 1
           exit
        end if
     end do
  end do
  out=1
  do j = 1,26
     out=out*int(nalp(j)+1,8)
     out=mod(out,(10**9+7))
  end do
  out=out-1
  write(*,'(i0)') mod( out, (10**9+7) )
  stop
end program main
