#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
using PII = pair<int, int>;
using TI3 = tuple<int, int, int>;
using LL = long long;
using ULL = unsigned long long;
using MAT = array<array<LL, 2>, 2>;
template <class T, size_t = numeric_limits<T>::max()>
constexpr inline T _start(const T&) {
  return 0;
}
template <class T>
constexpr inline typename T::const_iterator _start(const T& x) {
  return x.begin();
}
template <class T, size_t = numeric_limits<T>::max()>
constexpr inline T _end(const T& x) {
  return x;
}
template <class T>
constexpr inline typename T::const_iterator _end(const T& x) {
  return x.end();
}
template <class T>
void _read(T& x) {
  cin >> x;
}
void _read(size_t& x) { scanf("%zu", &x); }
void _read(int& x) { scanf("%d", &x); }
void _read(LL& x) { scanf("%lld", &x); }
void _read(ULL& x) { scanf("%llu", &x); }
void _read(double& x) { scanf("%lf", &x); }
void _read(char& x) { scanf(" %c", &x); }
void _read(char* x) { scanf("%s", x); }
void read() {}
template <class T, class... U>
void read(T& head, U&... tail) {
  _read(head);
  read(tail...);
}
template <class T>
void _print(const T& x) {
  cout << x;
}
void _print(const size_t& x) { printf("%zu", x); }
void _print(const int& x) { printf("%d", x); }
void _print(const LL& x) { printf("%lld", x); }
void _print(const ULL& x) { printf("%llu", x); }
void _print(const double& x) { printf("%.16lf", x); }
void _print(const char& x) { putchar(x); }
void _print(const char* x) { printf("%s", x); }
template <class T>
void _print(const vector<T>& x) {
  for (auto i = x.begin(); i != x.end(); _print(*i++)) {
    if (i != x.cbegin()) putchar(' ');
  }
}
void print() {}
template <class T, class... U>
void print(const T& head, const U&... tail) {
  _print(head);
  putchar(sizeof...(tail) ? ' ' : '\n');
  print(tail...);
}
const int MOD = 1000000009;
template <class T>
T mypow(T x, unsigned long long p) {
  T ret = 1;
  for (; p > 0; p >>= 1, x *= x) {
    if (p & 1) {
      ret *= x;
    }
  }
  return ret;
}
template <int P>
class Zp {
 public:
  Zp(long long _x = 0) : x(_x) {
    x %= P;
    x = (x < 0) ? x + P : x;
  }
  Zp& operator+=(const Zp& rhs) {
    this->x += rhs.x;
    if (this->x >= P) this->x -= P;
    return *this;
  }
  template <class T>
  Zp& operator+=(const T& rhs) {
    operator+=(Zp(rhs));
    return *this;
  }
  template <class T>
  friend Zp operator+(Zp lhs, const T& rhs) {
    lhs += rhs;
    return lhs;
  }
  Zp& operator*=(const Zp& rhs) {
    this->x = (this->x * rhs.x) % P;
    return *this;
  }
  template <class T>
  Zp& operator*=(const T& rhs) {
    operator*=(Zp(rhs));
    return *this;
  }
  template <class T>
  friend Zp operator*(Zp lhs, const T& rhs) {
    lhs *= rhs;
    return lhs;
  }
  Zp operator-() { return 0 - *this; }
  Zp& operator-=(const Zp& rhs) {
    this->x -= rhs.x;
    if (this->x < 0) this->x += P;
    return *this;
  }
  template <class T>
  Zp& operator-=(const T& rhs) {
    operator-=(Zp(rhs));
    return *this;
  }
  template <class T>
  friend Zp operator-(Zp lhs, const T& rhs) {
    lhs -= rhs;
    return lhs;
  }
  Zp& operator/=(const Zp& rhs) {
    if (rhs.x == 0) {
      throw std::overflow_error("Divide by zero exception");
    }
    operator*=(mypow(rhs, P - 2));
    return *this;
  }
  template <class T>
  Zp& operator/=(const T& rhs) {
    operator/=(Zp(rhs));
    return *this;
  }
  template <class T>
  friend Zp operator/(Zp lhs, const T& rhs) {
    lhs /= rhs;
    return lhs;
  }
  Zp& operator++() {
    operator+=(1);
    return *this;
  }
  Zp operator++(int) {
    Zp tmp(*this);
    operator++();
    return tmp;
  }
  bool operator==(const Zp& rhs) { return this->x == rhs.x; }
  template <class T>
  bool operator==(const T& rhs) {
    return operator==(Zp(rhs));
  }
  template <class T>
  bool operator!=(const T& rhs) {
    return not operator==(Zp(rhs));
  }

 private:
  long long x;
  friend ostream& operator<<(ostream& out, const Zp& a) { return out << a.x; }
  friend istream& operator>>(istream& in, Zp& rhs) {
    long long t;
    in >> t;
    rhs = Zp(t);
    return in;
  }
};
char tmp[300005];
int main() {
  LL n, k;
  Zp<MOD> a, b, first = 0;
  read(n, a, b, k);
  read(tmp);
  auto cur = mypow(a, n);
  for (auto i = _start(k); i != _end(k); ++i) {
    int s = (tmp[i] == '+') ? 1 : -1;
    first = first + s * cur;
    cur = cur * b / a;
  }
  auto r = mypow(b, k) / mypow(a, k);
  if (r == 1) {
    print(first * ((n + 1) / k));
    return 0;
  }
  LL m = (n + 1) / k;
  auto ans = first * (mypow(r, m) - 1) / (r - 1);
  print(ans);
  return 0;
}
