#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 9;
const long long INF = 1e9;
inline long long pwr(long long base, long long n, long long m) {
  long long ans = 1;
  while (n > 0) {
    if (n % 2 == 1) ans = (ans * base) % m;
    base = (base * base) % m;
    n /= 2;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, a, b, k;
  cin >> n >> a >> b >> k;
  char c;
  long long ans = 0;
  long long p = (n + 1) / k;
  for (long long i = 0; i < k; i++) {
    cin >> c;
    long long num = pwr(a, n - i, M);
    num = (num * pwr(b, i, M)) % M;
    long long r = (b * pwr(a, M - 2, M)) % M;
    r = pwr(r, k, M);
    if (r == 1) {
      num = (num * p) % M;
    } else {
      num = (num * ((1 + M - pwr(r, p, M)) % M)) % M;
      num = (num * pwr((1 + M - r) % M, M - 2, M)) % M;
    }
    if (c == '+')
      ans = (ans + num) % M;
    else
      ans = (ans + M - num) % M;
  }
  cout << ans;
  return 0;
}
