let n = read_int ()
let s = read_line ()
let m = 1_000_000_007
let cs = Array.make 128 0
let _ =
  String.iter (fun c -> cs.(Char.code c) <- cs.(Char.code c) + 1) s;
  (Array.fold_left (fun ans c -> ans * (c + 1) mod m) 1 cs + m - 1) mod m |> Printf.printf "%d\n"