let () = Scanf.scanf "%d\n%s" @@ fun n s ->
  let count = Array.make 26 0 in
  String.iter (fun c ->
    let i = Char.code c - Char.code 'a' in
    count.(i) <- count.(i) + 1) s;
  Printf.printf "%d\n" @@
    (Array.fold_left (fun acc cnt -> acc * (cnt + 1) mod 1000000007) 1 count + 1000000006) mod 1000000007
