#include <bits/stdc++.h>
template <typename T>
class IntegerIterator
    : public std::iterator<std::input_iterator_tag, T, std::ptrdiff_t, T*, T> {
 public:
  explicit IntegerIterator(int value) : value(value) {}
  IntegerIterator& operator++() {
    ++value;
    return *this;
  }
  IntegerIterator operator++(int) {
    IntegerIterator copy = *this;
    ++value;
    return copy;
  }
  IntegerIterator& operator--() {
    --value;
    return *this;
  }
  IntegerIterator operator--(int) {
    IntegerIterator copy = *this;
    --value;
    return copy;
  }
  T operator*() const { return value; }
  bool operator==(IntegerIterator rhs) { return value == rhs.value; }
  bool operator!=(IntegerIterator rhs) { return !(*this == rhs); }

 private:
  T value;
};
template <typename T>
class IntegerRange {
 public:
  IntegerRange(T begin, T end) : begin_(begin), end_(end) { ; }
  IntegerIterator<T> begin() const { return IntegerIterator<T>(begin_); }
  IntegerIterator<T> end() const { return IntegerIterator<T>(end_); }

 private:
  T begin_;
  T end_;
};
template <typename T>
class ReversedIntegerRange {
 public:
  ReversedIntegerRange(T begin, T end) : begin_(begin), end_(end) { ; }
  std::reverse_iterator<IntegerIterator<T>> begin() const {
    return std::reverse_iterator<IntegerIterator<T>>(
        IntegerIterator<T>(begin_));
  }
  std::reverse_iterator<IntegerIterator<T>> end() const {
    return std::reverse_iterator<IntegerIterator<T>>(IntegerIterator<T>(end_));
  }

 private:
  T begin_;
  T end_;
};
template <typename T>
IntegerRange<T> range(T to) {
  return IntegerRange<T>(0, to);
}
template <typename T>
IntegerRange<T> range(T from, T to) {
  return IntegerRange<T>(from, to);
}
template <typename T>
IntegerRange<T> inclusiveRange(T to) {
  return IntegerRange<T>(0, to + 1);
}
template <typename T>
IntegerRange<T> inclusiveRange(T from, T to) {
  return IntegerRange<T>(from, to + 1);
}
template <typename T>
ReversedIntegerRange<T> downrange(T from) {
  return ReversedIntegerRange<T>(from, 0);
}
template <typename T>
ReversedIntegerRange<T> downrange(T from, T to) {
  return ReversedIntegerRange<T>(from, to);
}
template <typename T>
ReversedIntegerRange<T> inclusiveDownrange(T from) {
  return ReversedIntegerRange<T>(from + 1, 0);
}
template <typename T>
ReversedIntegerRange<T> inclusiveDownrange(T from, T to) {
  return ReversedIntegerRange<T>(from + 1, to);
}
template <typename T>
T identity();
template <typename T, typename Enable = std::true_type>
struct impl__IdentityHelper {};
template <typename T>
struct impl__SampleIdentityHelper {
  static T identity(const T&) { return ::identity<T>(); }
};
template <typename T>
struct impl__IdentityHelper<T, typename std::is_arithmetic<T>::type> {
  static T identity() { return 1; }
};
template <typename T>
T identity(const T& sample) {
  return impl__SampleIdentityHelper<T>::identity(sample);
}
template <typename T>
T identity() {
  return impl__IdentityHelper<T>::identity();
}
template <typename T>
T extendedGcd(T a, T b, T& x, T& y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  T d = extendedGcd(b % a, a, y, x);
  x -= (b / a) * y;
  return d;
}
template <int mod>
class Zn {
  static_assert(mod > 0, "Mod has to be positive integer");

 public:
  Zn() : value(0) {}
  static Zn valueOf(int value) {
    int x = value % mod;
    if (x < 0) {
      x += mod;
    }
    return Zn(x);
  }
  static Zn valueOf(long long value) {
    int x = static_cast<int>(value % mod);
    if (x < 0) {
      x += mod;
    }
    return Zn(x);
  }
  static Zn rawValueOf(int value) {
    ;
    return Zn(value);
  }
  Zn& operator=(int rhs) { return *this = Zn::valueOf(rhs); }
  Zn& operator=(long long rhs) { return *this = Zn::valueOf(rhs); }
  Zn& operator+=(const Zn& rhs) {
    value += rhs.value;
    if (value >= mod) {
      value -= mod;
    }
    return *this;
  }
  Zn& operator+=(int rhs) { return *this += Zn::valueOf(rhs); }
  Zn& operator+=(long long rhs) { return *this += Zn::valueOf(rhs); }
  Zn& operator-=(const Zn& rhs) {
    value -= rhs.value;
    if (value < 0) {
      value += mod;
    }
    return *this;
  }
  Zn& operator-=(int rhs) { return *this -= Zn::valueOf(rhs); }
  Zn& operator-=(long long rhs) { return *this -= Zn::valueOf(rhs); }
  Zn& operator*=(const Zn& rhs) {
    long long result =
        static_cast<long long>(value) * static_cast<long long>(rhs.value);
    value = static_cast<int>(result % mod);
    return *this;
  }
  Zn& operator*=(int rhs) { return *this *= Zn::valueOf(rhs); }
  Zn& operator*=(long long rhs) { return *this *= Zn::valueOf(rhs); }
  Zn operator-() const {
    if (value == 0) {
      return *this;
    } else {
      return Zn(mod - value);
    }
  }
  Zn& operator/=(const Zn& rhs) { return *this *= rhs.inversed(); }
  Zn& operator/=(int rhs) { return *this /= Zn::valueOf(rhs); }
  Zn& operator/=(long long rhs) { return *this /= Zn::valueOf(rhs); }
  bool operator==(const Zn& rhs) const { return value == rhs.value; }
  Zn inversed() const {
    ;
    int x, y;
    int gcd = extendedGcd(value, mod, x, y);
    (void)gcd;
    ;
    if (x < 0) {
      x += mod;
    }
    return Zn(x);
  }
  template <int m>
  friend std::ostream& operator<<(std::ostream&, const Zn<m>& zn);
  template <int m>
  friend std::istream& operator>>(std::istream&, Zn<m>& zn);
  int intValue() const { return value; }

 private:
  explicit Zn(int value) : value(value) {}
  int value;
};
template <int m>
bool operator==(const Zn<m>& lhs, int rhs) {
  return lhs == Zn<m>::valueOf(rhs);
}
template <int m>
bool operator==(int lhs, const Zn<m>& rhs) {
  return rhs == lhs;
}
template <int m>
bool operator==(const Zn<m>& lhs, long long rhs) {
  return lhs == Zn<m>::valueOf(rhs);
}
template <int m>
bool operator==(long long lhs, Zn<m>& rhs) {
  return rhs == lhs;
}
template <int m>
bool operator!=(const Zn<m>& lhs, const Zn<m>& rhs) {
  return !(lhs == rhs);
}
template <int m>
bool operator!=(const Zn<m>& lhs, int rhs) {
  return !(lhs == rhs);
}
template <int m>
bool operator!=(int lhs, const Zn<m>& rhs) {
  return !(lhs == rhs);
}
template <int m>
bool operator!=(const Zn<m>& lhs, long long rhs) {
  return !(lhs == rhs);
}
template <int m>
bool operator!=(long long rhs, const Zn<m>& lhs) {
  return !(lhs == rhs);
}
template <int m>
Zn<m> operator+(const Zn<m>& lhs, const Zn<m>& rhs) {
  Zn<m> copy = lhs;
  return copy += rhs;
}
template <int m>
Zn<m> operator+(const Zn<m>& lhs, int rhs) {
  Zn<m> copy = lhs;
  return copy += rhs;
}
template <int m>
Zn<m> operator+(int lhs, const Zn<m>& rhs) {
  return rhs + lhs;
}
template <int m>
Zn<m> operator+(const Zn<m>& lhs, long long rhs) {
  Zn<m> copy = lhs;
  return copy += rhs;
}
template <int m>
Zn<m> operator+(long long lhs, const Zn<m>& rhs) {
  return rhs + lhs;
}
template <int m>
Zn<m> operator-(const Zn<m>& lhs, const Zn<m>& rhs) {
  Zn<m> copy = lhs;
  return copy -= rhs;
}
template <int m>
Zn<m> operator-(const Zn<m>& lhs, int rhs) {
  Zn<m> copy = lhs;
  return copy -= rhs;
}
template <int m>
Zn<m> operator-(int lhs, const Zn<m>& rhs) {
  return Zn<m>::valueOf(lhs) - rhs;
}
template <int m>
Zn<m> operator-(const Zn<m>& lhs, long long rhs) {
  Zn<m> copy = lhs;
  return copy -= rhs;
}
template <int m>
Zn<m> operator-(long lhs, const Zn<m>& rhs) {
  return Zn<m>::valueOf(lhs) - rhs;
}
template <int m>
Zn<m> operator*(const Zn<m>& lhs, const Zn<m>& rhs) {
  Zn<m> copy = lhs;
  return copy *= rhs;
}
template <int m>
Zn<m> operator*(const Zn<m>& lhs, int rhs) {
  Zn<m> copy = lhs;
  return copy *= rhs;
}
template <int m>
Zn<m> operator*(int lhs, const Zn<m>& rhs) {
  return rhs * lhs;
}
template <int m>
Zn<m> operator*(const Zn<m>& lhs, long long rhs) {
  Zn<m> copy = lhs;
  return copy *= rhs;
}
template <int m>
Zn<m> operator*(long long lhs, const Zn<m>& rhs) {
  return rhs * lhs;
}
template <int m>
Zn<m> operator/(const Zn<m>& lhs, const Zn<m>& rhs) {
  Zn<m> copy = lhs;
  return copy /= rhs;
}
template <int m>
Zn<m> operator/(const Zn<m>& lhs, int rhs) {
  Zn<m> copy = lhs;
  return copy /= rhs;
}
template <int m>
Zn<m> operator/(int lhs, const Zn<m>& rhs) {
  return Zn<m>::valueOf(lhs) / rhs;
}
template <int m>
Zn<m> operator/(const Zn<m>& lhs, long long rhs) {
  Zn<m> copy = lhs;
  return copy /= rhs;
}
template <int m>
Zn<m> operator/(long long lhs, const Zn<m>& rhs) {
  return Zn<m>::valueOf(lhs) / rhs;
}
template <int m>
std::ostream& operator<<(std::ostream& stream, const Zn<m>& zn) {
  return stream << zn.value;
}
template <int m>
std::istream& operator>>(std::istream& stream, Zn<m>& zn) {
  long long value;
  stream >> value;
  zn.value = static_cast<int>(value % m);
  return stream;
}
template <int m>
struct impl__IdentityHelper<Zn<m>> {
  static Zn<m> identity() { return Zn<m>::valueOf(1); }
};
using namespace std;
class TaskE {
 public:
  void solve(std::istream& in, std::ostream& out) {
    int n, k;
    in >> n >> k;
    string add;
    for (int i : range(k)) {
      add += char(i + 'a');
    }
    string s;
    in >> s;
    for (char c : s) {
      size_t id = add.find(c);
      rotate(add.begin() + id, add.begin() + id + 1, add.end());
    }
    using Z = Zn<1000000007>;
    vector<Z> curans(26);
    Z cursum = Z::valueOf(1);
    for (char c : s) {
      Z curadd = cursum - curans[c - 'a'];
      curans[c - 'a'] += curadd;
      cursum += curadd;
    }
    for (int i : range(n)) {
      char c = add[i % k];
      Z curadd = cursum - curans[c - 'a'];
      curans[c - 'a'] += curadd;
      cursum += curadd;
    }
    out << cursum << "\n";
  }
};
int main() {
  std::ios_base::sync_with_stdio(false);
  TaskE solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  in.tie(0);
  out << std::fixed;
  out.precision(20);
  solver.solve(in, out);
  return 0;
}
