program main
  implicit none
  integer(8) :: n, i, j, cnt(26), res
  integer(8), parameter :: m = 10 ** 9 + 7
  character(100000) :: s

  read (*, *) n
  read (*, *) s

  cnt(:) = 1
  do i = 1, n
    j = iachar(s(i:i)) - iachar("a") + 1
    cnt(j) = cnt(j) + 1
  end do

  res = 1
  do i = 1, 26
    res = res * cnt(i)
    res = modulo(res, m)
  end do
  write (*, "(i0)") modulo(res - 1, m)

end program main
