#include <bits/stdc++.h>
using namespace std;

#ifdef LOCAL
#include <debugger.h>
#else
#define dbg(x...) {}
#define dbg_t()   {}
#endif

using ll = long long;
using ld = long double;

const ll INF = 1e18;


void solve()
{
  vector<vector<ll>> dp(64, vector<ll>(64, -1));
  function<ll(ll, ll)> ncr = [&](ll n, ll r)
  {
    if (r > n)
      return 0ll;

    if (n == 0)
      return 0ll;

    if (r == 0)
      return 1ll;

    if (n == r)
      return 1ll;

    if (dp[n][r] != -1)
      return dp[n][r];

    ll ans = 0;
    ans += ncr(n - 1, r);
    ans += ncr(n - 1, r - 1);
    return dp[n][r] = ans;
  }; 
  ll a, b, k; cin >> a >> b >> k;
  string ans;
  ll t = a + b;
  for (ll i = 0; i < t; i++)
  {
    if (a == 0)
    {
      ans += 'b';
      b--;
    }
    else if (b == 0)
    {
      ans += 'a';
      a--;
    }
    else
    {
      if (ncr(a + b - 1, a - 1) >= k)
      {
        ans += 'a';
        a--;
      }
      else
      {
        ans += 'b';
        k -= ncr(a + b - 1, a - 1);
        b--;
      }
    }
  }
  cout << ans << "\n"; 
}


signed main()
{  
  ios::sync_with_stdio(false);
  cin.tie(0); cout.tie(0);

#ifdef LOCAL
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif

  ll _t = 1;
  // cin >> _t;
  for (ll i = 1; i <= _t; i++)
  {
    // cout << "Case #" << i << ": ";
    solve();
  }

  dbg_t();
  
  return 0;
}     
     

#include <bits/stdc++.h>
using namespace std;

#define REP(i, n) for(int i = 0; i < (int)(n); ++i)
#define FOR(i, a, b) for(int i = (int)(a); i <= (int)(b); ++i)
#define FORR(i, a, b) for(int i = (int)(a); i >= (int)(b); --i)
#define ALL(c) (c).begin(), (c).end()

using ll = long long;
using VI = vector<int>;
using VL = vector<ll>;
using VD = vector<double>;
using VII = vector<VI>;
using VLL = vector<VL>;
using VDD = vector<VD>;
using P = pair<int, int>;
using PL = pair<ll, ll>;

template <typename T>
bool chmax(T& a, const T& b) {
  if(a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
bool chmin(T& a, const T& b) {
  if(a > b) {
    a = b;
    return true;
  }
  return false;
}

ll get_count(ll N, ll x, VL& sum_two) {
  ll count = 0;
  FOR(i, 1, N) {
    if(i >= x) break;
    count += sum_two[x - i];
  }
  return count;
}

void solve(long long N, long long K) {
  VL count_two(3 * N + 1, 0);
  VL sum_two(3 * N + 2, 0);
  FOR(i, 2, 3 * N) {
    count_two[i] = max(0ll, min(N, ll(i - 1)) - max(1ll, ll(i - N)) + 1ll);
  };
  FOR(i, 2, 3 * N) {
    sum_two[i + 1] += sum_two[i] + count_two[i];
  }
  ll ok = 0;
  ll ng = 3 * N + 1;
  while(abs(ok - ng) > 1) {
    ll mid = (ok + ng) / 2;
    if(get_count(N, mid, sum_two) < K) {
      ok = mid;
    } else {
      ng = mid;
    }
  }
  K -= get_count(N, ok, sum_two);
  ll x = 1, y = 1, z = 1;
  ll tmp_count = 0;
  FOR(i, 1, N) {
    if(tmp_count + count_two[ok - i] >= K) {
      K -= tmp_count;
      x = i;
      break;
    }
    tmp_count += count_two[ok - i];
  }
  tmp_count = 0;
  FOR(i, 1, N) {
    if(ok - x - i >= 1 && ok - x - i <= N) tmp_count++;
    if(tmp_count == K) {
      y = i;
      break;
    }
  }
  z = ok - x - y;
  cout << x << " " << y << " " << z << endl;
}

int main() {
  long long N;
  scanf("%lld", &N);
  long long K;
  scanf("%lld", &K);
  solve(N, K);
  return 0;
}
