#include <bits/stdc++.h>
using namespace std;
const long long MD = 1e9 + 9;
long long po(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % MD;
    b >>= 1, a = a * a % MD;
  }
  return ans;
}
int main() {
  long long n, a, b, k;
  cin >> n >> a >> b >> k;
  string s;
  cin >> s;
  long long cur = 0;
  for (int i = 0; i < k; i++) {
    if (s[i] == '+')
      cur = (cur + po(a, n - i) * po(b, i) % MD) % MD;
    else
      cur = (cur - po(a, n - i) * po(b, i) % MD + MD) % MD;
  }
  long long t = po(a, k * (MD - 2) % (MD - 1)) * po(b, k) % MD;
  if (t == 1)
    cout << cur * ((n + 1) / k) % MD;
  else
    cout << cur * po(t - 1, MD - 2) % MD * (po(t, (n + 1) / k) - 1) % MD;
  return 0;
}
