#include <bits/stdc++.h>
using namespace std;
long long n, a, b, k;
int s[100010];
long long quick_pow(long long a, long long b) {
  if (b == 0) return 1;
  long long temp = quick_pow(a, b >> 1);
  if (b & 1) {
    return a % 1000000009 * temp % 1000000009 * temp % 1000000009;
  } else
    return temp % 1000000009 * temp % 1000000009;
}
long long inv(long long a, long long m) {
  return a == 1 ? 1 : (m - m / a) * inv(m % a, m) % m;
}
int main() {
  ios::sync_with_stdio(false);
  char ch;
  while (cin >> n >> a >> b >> k) {
    for (int i = 0; i < k; i++) {
      cin >> ch;
      if (ch == '+')
        s[i] = 1;
      else
        s[i] = -1;
    }
    long long a1 = 0;
    for (int i = 0; i < k; i++) {
      a1 = ((a1 + s[i] * quick_pow(a, n - i) * quick_pow(b, i)) % 1000000009 +
            1000000009) %
           1000000009;
    }
    long long num = (n + 1) / k;
    long long q = quick_pow(b, k) % 1000000009 *
                  quick_pow(inv(a, 1000000009), k) % 1000000009;
    if (q == 1) {
      cout << num * a1 % 1000000009 << endl;
    } else {
      long long sum = ((a1 * (quick_pow(q, num) - 1) % 1000000009 *
                        inv(q - 1, 1000000009)) %
                           1000000009 +
                       1000000009) %
                      1000000009;
      cout << sum << endl;
    }
  }
}
