#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
class Mint {
 private:
  long long int x;
  inline static long long int mod = 1e9 + 9;
  long long int fastPow(long long int x, long long int p) const {
    if (p == 0)
      return 1;
    else if (p % 2 == 0) {
      auto ans = fastPow(x, p / 2);
      return ans * ans % mod;
    } else {
      auto ans = fastPow(x, p - 1);
      return ans * x % mod;
    }
  }

 public:
  Mint() : x(0) {}
  Mint(long long int x) : x(x % mod) {}
  Mint(const Mint& other) {
    this->x = other.x;
    this->mod = other.mod;
  }
  Mint(Mint&& other) {
    swap(this->x, other.x);
    swap(this->mod, other.mod);
  }
  long long int getX() const { return x; }
  long long int getM() const { return mod; }
  long long int rev() const { return fastPow(x, mod - 2); }
  Mint operator=(const Mint& other) {
    this->x = other.x;
    return *this;
  }
  Mint operator=(Mint&& other) {
    swap(x, other.x);
    return *this;
  }
  Mint operator+(const Mint& other) const {
    long long int nx = (x + other.x + mod) % mod;
    return Mint(nx);
  }
  Mint operator-(const Mint& other) const {
    long long int nx = (x - other.x + mod) % mod;
    return Mint(nx);
  }
  Mint operator*(const Mint& other) const {
    long long int nx = (x * other.x) % mod;
    return Mint(nx);
  }
  Mint operator/(const Mint& other) const {
    long long int nx = (x * other.rev()) % mod;
    return Mint(nx);
  }
  void operator+=(const Mint& other) { *this = *this + other; }
  void operator-=(const Mint& other) { *this = *this - other; }
  void operator*=(const Mint& other) { *this = *this * other; }
  void operator/=(const Mint& other) { *this = *this / other; }
  bool operator==(const Mint& other) { return x == other.x; }
  bool operator!=(const Mint& other) { return x != other.x; }
  friend istream& operator>>(istream& in, Mint& a) {
    long long int nx;
    in >> nx;
    a = nx;
    return in;
  }
};
ostream& operator<<(ostream& out, const Mint& a) { return out << a.getX(); }
Mint operator+(long long int A, const Mint& B) {
  long long int nx = (A + B.getX() + B.getM()) % B.getM();
  return Mint(nx);
}
Mint operator-(long long int A, const Mint& B) {
  long long int nx = (A - B.getX() + B.getM()) % B.getM();
  return Mint(nx);
}
Mint operator*(long long int A, const Mint& B) {
  long long int nx = (A * B.getX()) % B.getM();
  return Mint(nx);
}
Mint operator/(long long int A, const Mint& B) {
  long long int nx = (A * B.rev()) % B.getM();
  return Mint(nx);
}
Mint fastPow(Mint x, long long int p) {
  if (p == 0)
    return 1;
  else if (p % 2 == 0) {
    auto ans = fastPow(x, p / 2);
    return ans * ans;
  } else {
    auto ans = fastPow(x, p - 1);
    return ans * x;
  }
}
long long int n, k;
Mint a, b;
string s;
vector<long long int> c;
signed main() {
  cin >> n >> a >> b >> k >> s;
  c.resize(k);
  for (long long int i = 0; i < k; ++i) {
    if (s[i] == '+')
      c[i] = 1;
    else
      c[i] = -1;
  }
  Mint S = 0;
  Mint nowA = fastPow(a, n), nowB = 1;
  for (long long int i = 0; i < k; ++i) {
    S += c[i] * nowA * nowB;
    nowA /= a;
    nowB *= b;
  }
  Mint q = fastPow(b, k) / fastPow(a, k), Sn;
  long long int cnt = (n + 1) / k;
  if (q == 1)
    Sn = cnt;
  else
    Sn = (fastPow(q, cnt) - 1) / (q - 1);
  cout << Sn * S << "\n";
  return 0;
}
