#include <bits/stdc++.h>
using namespace std;
long long Mod = 1e9 + 9;
inline int R() {
  char ch = getchar();
  int rt = 0;
  bool isn = false;
  for (; ch > '9' || ch < '0'; ch = getchar()) isn = ch == '-' ? true : isn;
  for (; ch <= '9' && ch >= '0'; ch = getchar()) rt = rt * 10 + ch - '0';
  return isn ? -rt : rt;
}
long long Pow(long long na, long long t) {
  long long rt = 1;
  while (t) {
    if (t & 1) rt *= na, rt %= Mod;
    na *= na, na %= Mod;
    t >>= 1;
  }
  return rt;
}
long long Rev(int na) { return Pow(na, Mod - 2); }
int main() {
  long long n = R(), a = R(), b = R(), k = R();
  long long ans = 0;
  long long fa = Rev(Pow(a, k)) * Pow(b, k) % Mod;
  long long ra = Rev(a);
  char op = getchar();
  while (op != '-' && op != '+') op = getchar();
  long long na = Pow(a, n), nb = 1;
  for (int i = 0; i < k; ++i) {
    ans += op == '+' ? na * nb % Mod : Mod - (na * nb % Mod);
    ans %= Mod;
    op = getchar();
    na *= ra, na %= Mod, nb *= b, nb %= Mod;
  }
  long long t = (n + 1) / k;
  if (t == 1) {
    cout << ans << endl;
    return 0;
  }
  if (fa == 1) {
    cout << ans * t % Mod << endl;
    return 0;
  }
  long long fn = Pow(fa, t);
  long long fans = fn - 1;
  fans = fans < 0 ? Mod - fans : fans % Mod;
  --fa;
  fa = fa < 0 ? Mod - fa : fa % Mod;
  cout << fans * Rev(fa) % Mod * ans % Mod << endl;
  return 0;
}
