#include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define rep(i, n) ;for (int i = 0;i < (int)(n);i++)
#define rep2(i, s, n) ;for (int i = s; i < (int)(n);i++)
#define ALL(vec)  (vec).begin(),(vec).end()
#define pi 3.1415926535897932384626433832795
#define MAX_INF 9223372036854775807
#define MIN_INF (9223372036854775807+1)
#define sosuu 1000000007

lli combi[65][35];

lli nCr(lli n, lli r)
{
       if(n<r) return 0;
       if(n==r) return combi[n][r] = 1;
       if(r==0) return combi[n][r] = 1;
       if(r==1) return combi[n][r] = n;
       if(combi[n][r]) return combi[n][r];
       return combi[n][r] = nCr(n-1,r) + nCr(n-1,r-1);
}

int main() 
{
  int A, B;
  cin >> A >> B;
  lli K;
  cin >> K;
  int now=A+B;
  lli ground=0;
  int all=now;
  rep(i, all){
    if(now==0){
    if(K==0)
      cout << 'a';
      else
        cout << 'b';
      
      break;
    
    
    }
    if(A!=0){
      if(B!=0){
        if(nCr(now-1, A-1)<K){
          cout << 'b';
          K-=nCr(now-1, A-1);
          now --;
          B --;
          continue;
        }//(nCr(now-1, A-1)<K)
        else{
          cout << 'a';
          now --;
          A --;
          continue;
        }//(nCr(now-1, A-1)>=K)
      }//B!=0
      else{
        
      
        cout << 'a';
        A--;
        continue;
      }//B==0
    }//A!=0
    else{
      cout << 'b';
      B--;
      continue;
    }//A==0
  }
  
  cout << endl;
}

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
struct fast_ios { fast_ios(){ cin.tie(nullptr), ios::sync_with_stdio(false), cout << fixed << setprecision(20); }; } fast_ios_;
const int INF = (int)1e9;
const ll INFL = (ll)1e18;
const int MOD = 1e9 + 7;
const double EPS = 1e-10;
int dx[]={0, 0, -1, 1};
int dy[]={1, -1, 0, 0};
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }


int main()
{
    int h, w, x, y;
    cin >> h >> w >> x >> y;
    char s[110][110] = {'#'};
    x--;
    y--;
    rep(i,h) 
    {
        rep(j,w)
        {
            cin >> s[i][j];
        }   
    }
    
    int ans = 1;

    int p = 1;
    if (s[x][y + p] == '.')
    {
        while (s[x][y + p] == '.' && y + p != w)
        {
            p++;
            ans++;
        }
    }

    int i = 1;
    if (y != 0)
    {
        if (s[x][y - i] == '.')
        {
            while (s[x][y - i] == '.')
            {
                i++;
                ans++;
                if (y - i == -1)
                    break;
            }
        }
    }

    int j = 1;
    if (s[x + j][y] == '.')
    {
        while (s[x + j][y] == '.' && x + j != h)
        {
            j++;
            ans++;
        }
    }

    int k = 1;
    if (x != 0)
    {   if (s[x - k][y] == '.')
        {
            while (s[x - k][y] == '.')
            {
                k++;
                ans++;
                if (x - k == -1)
                    break;
            }
        }
    }
    cout << ans << endl;
    return 0;
}