//#pragma comment(linker, "/STACK:134217728")
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
//#include <ctime>
using namespace std;

typedef pair<int,int> PII;
typedef vector<int> VI;

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); --i)
#define CLEAR(a, b) memset(a, b, sizeof(a))
#define ALL(a) (a).begin(),(a).end()
#define PB push_back
#define MP make_pair
#define MOD 1000000007
#define INF 1000000007
#define y1 agaga
#define ll long long
#define pi acos(-1.0)

int n;
long long  c12[55];
long long  c21[55];
long long  c22[55];
long long k1[55];
long long k2[55];

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    ios::sync_with_stdio(false);

    k1[1]=1;
    k2[1]=0;

    k1[2]=0;
    k2[2]=1;

    FOR(i,3,51)
    {
	    k1[i]=k1[i-2]+k1[i-1];
	    k2[i]=k2[i-2]+k2[i-1];
    }

    ////////////

    FOR(i,0,4)
    {
	    c12[i]=0;
	    c21[i]=0;
	    c22[i]=0;
    }

    c12[3]=1;

    FOR(i,4,51)
    {
	c12[i]=c12[i-2]+c12[i-1];
	c21[i]=c21[i-2]+c21[i-1];
	c22[i]=c22[i-2]+c22[i-1];

	if (i%2==0)
		c21[i]++;
	else
		c22[i]++;
    }

    /*FOR(i,0,51)
    {
	    cout << " i=" << i << endl;

	    cout << " K1=" << k1[i] << " K2=" << k2[i] << endl;

	    cout << c12[i] << " " << c22[i] << " " << c21[i] << endl;
    }*/

    int k,x,n,m;
    string s1="";
    string s2="";

    cin >> k >> x >> n >> m;

    //////  with no condition

    FOR(i,0,n/2+1)
	    FOR(j,0,m/2+1)
	    if (i*k1[k]+j*k2[k]==x)
	    {
		    FOR(q,0,i)
			    s1+="AC";
		    while (s1.size()<n)
			    s1+='A';

		    FOR(q,0,j)
			    s2+="AC";
		    while (s2.size()<m)
			    s2+='A';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    ////// first condition

    FOR(i,0,n)
	    s1+='A';

    FOR(i,0,m)
	    s2+='A';

       FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]==x)
	    {

		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// second

	         FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c21[k]==x)
	    {

		s1[0]='C';

		FOR(q,0,i)
			s1[q*2+2]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    //// third

	  FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c22[k]==x)
	    {

		s2[0]='C';
		s1[n-1]='Z';

		//cout << i <<  " " << j << endl;

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// 1 + 2

	   FOR(i,0,(n-2)/2+1)
	    FOR(j,0,(m-2)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]==x)
	    {
		    s1[0]='C';
		    s2[0]='C';

		FOR(q,0,i)
			s1[q*2+3]='C';
		FOR(q,0,j)
			s2[q*2+3]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

   //// 1 + 3

	   FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]+c22[k]==x)
	    {

		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    cout << "Happy new year!" << endl;

    return 0;
}


//#pragma comment(linker, "/STACK:134217728")
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
//#include <ctime>
using namespace std;

typedef pair<int,int> PII;
typedef vector<int> VI;

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); --i)
#define CLEAR(a, b) memset(a, b, sizeof(a))
#define ALL(a) (a).begin(),(a).end()
#define PB push_back
#define MP make_pair
#define MOD 1000000007
#define INF 1000000007
#define y1 agaga
#define ll long long
#define pi acos(-1.0)

int n;
long long  c12[55];
long long  c21[55];
long long  c22[55];
long long k1[55];
long long k2[55];

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    ios::sync_with_stdio(false);

    k1[1]=1;
    k2[1]=0;

    k1[2]=0;
    k2[2]=1;

    FOR(i,3,51)
    {
	    k1[i]=k1[i-2]+k1[i-1];
	    k2[i]=k2[i-2]+k2[i-1];
    }

    ////////////

    FOR(i,0,4)
    {
	    c12[i]=0;
	    c21[i]=0;
	    c22[i]=0;
    }

    c12[3]=1;

    FOR(i,4,51)
    {
	c12[i]=c12[i-2]+c12[i-1];
	c21[i]=c21[i-2]+c21[i-1];
	c22[i]=c22[i-2]+c22[i-1];

	if (i%2==0)
		c21[i]++;
	else
		c22[i]++;
    }

    /*FOR(i,0,51)
    {
	    cout << " i=" << i << endl;

	    cout << " K1=" << k1[i] << " K2=" << k2[i] << endl;

	    cout << c12[i] << " " << c22[i] << " " << c21[i] << endl;
    }*/

    int k,x,n,m;
    string s1="";
    string s2="";

    cin >> k >> x >> n >> m;

    bool ok=false;

    //////  with no condition

    FOR(i,0,n/2+1)
	    FOR(j,0,m/2+1)
	    if (i*k1[k]+j*k2[k]==x)
	    {
		    FOR(q,0,i)
			    s1+="AC";
		    while (s1.size()<n)
			    s1+='A';

		    FOR(q,0,j)
			    s2+="AC";
		    while (s2.size()<m)
			    s2+='A';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    ////// first condition

    FOR(i,0,n)
	    s1+='A';

    FOR(i,0,m)
	    s2+='A';

       FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]==x)
	    {

		   if (ok) cout << "first" << endl;

		s2[m-1]='Z';
		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// second

	         FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c21[k]==x)
	    {

		s1[0]='C';

		FOR(q,0,i)
			s1[q*2+2]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    //// third

	  FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c22[k]==x)
	    {

		s1[n-1]='Z';
		s2[0]='C';

		//cout << i <<  " " << j << endl;

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// 1 + 2

	   FOR(i,0,(n-2)/2+1)
	    FOR(j,0,(m-2)/2+1)
	   {
	    if (i*k1[k]+j*k2[k]+c12[k]+(1-m%2)*c21[k]+c22[k]==x)
	    {
		    s1[0]='C';
		    s2[0]='C';

		    if (ok) cout << "1+2" << endl;

		FOR(q,0,i)
			s1[q*2+2]='C';
		FOR(q,0,j)
			s2[q*2+2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }
	   }

   //// 1 + 3

	   FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]+c22[k]==x)
	    {

		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    cout << "Happy new year!" << endl;

    return 0;
}


//#pragma comment(linker, "/STACK:134217728")
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
//#include <ctime>
using namespace std;

typedef pair<int,int> PII;
typedef vector<int> VI;

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); --i)
#define CLEAR(a, b) memset(a, b, sizeof(a))
#define ALL(a) (a).begin(),(a).end()
#define PB push_back
#define MP make_pair
#define MOD 1000000007
#define INF 1000000007
#define y1 agaga
#define ll long long
#define pi acos(-1.0)

int n;
long long  c12[55];
long long  c21[55];
long long  c22[55];
long long k1[55];
long long k2[55];

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    ios::sync_with_stdio(false);

    k1[1]=1;
    k2[1]=0;

    k1[2]=0;
    k2[2]=1;

    FOR(i,3,51)
    {
	    k1[i]=k1[i-2]+k1[i-1];
	    k2[i]=k2[i-2]+k2[i-1];
    }

    ////////////

    FOR(i,0,4)
    {
	    c12[i]=0;
	    c21[i]=0;
	    c22[i]=0;
    }

    c12[3]=1;

    FOR(i,4,51)
    {
	c12[i]=c12[i-2]+c12[i-1];
	c21[i]=c21[i-2]+c21[i-1];
	c22[i]=c22[i-2]+c22[i-1];

	if (i%2==0)
		c21[i]++;
	else
		c22[i]++;
    }

    /*FOR(i,0,51)
    {
	    cout << " i=" << i << endl;

	    cout << " K1=" << k1[i] << " K2=" << k2[i] << endl;

	    cout << c12[i] << " " << c22[i] << " " << c21[i] << endl;
    }*/

    int k,x,n,m;
    string s1="";
    string s2="";

    cin >> k >> x >> n >> m;

    bool ok=false;

    //////  with no condition

    FOR(i,0,n/2+1)
	    FOR(j,0,m/2+1)
	    if (i*k1[k]+j*k2[k]==x)
	    {
		    FOR(q,0,i)
			    s1+="AC";
		    while (s1.size()<n)
			    s1+='A';

		    FOR(q,0,j)
			    s2+="AC";
		    while (s2.size()<m)
			    s2+='A';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    ////// first condition

    FOR(i,0,n)
	    s1+='A';

    FOR(i,0,m)
	    s2+='A';

       FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]==x)
	    {

		   if (ok) cout << "first" << endl;

		s2[0]='C';
		s2[m-1]='Z';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// second

	         FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c21[k]==x)
	    {

		s1[0]='C';

		FOR(q,0,i)
			s1[q*2+2]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    //// third

	  FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c22[k]==x)
	    {

		s2[0]='C';
		s1[n-1]='Z';

		//cout << i <<  " " << j << endl;

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// 1 + 2

	   FOR(i,0,(n-2)/2+1)
	    FOR(j,0,(m-2)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]==x)
	    {
		    s1[0]='C';
		    s2[0]='C';

		FOR(q,0,i)
			s1[q*2+3]='C';
		FOR(q,0,j)
			s2[q*2+3]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

   //// 1 + 3

	   FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]+c22[k]==x)
	    {

		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    cout << "Happy new year!" << endl;

    return 0;
}


//#pragma comment(linker, "/STACK:134217728")
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
//#include <ctime>
using namespace std;

typedef pair<int,int> PII;
typedef vector<int> VI;

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); --i)
#define CLEAR(a, b) memset(a, b, sizeof(a))
#define ALL(a) (a).begin(),(a).end()
#define PB push_back
#define MP make_pair
#define MOD 1000000007
#define INF 1000000007
#define y1 agaga
#define ll long long
#define pi acos(-1.0)

int n;
long long  c12[55];
long long  c21[55];
long long  c22[55];
long long k1[55];
long long k2[55];

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    ios::sync_with_stdio(false);

    k1[1]=1;
    k2[1]=0;

    k1[2]=0;
    k2[2]=1;

    FOR(i,3,51)
    {
	    k1[i]=k1[i-2]+k1[i-1];
	    k2[i]=k2[i-2]+k2[i-1];
    }

    ////////////

    FOR(i,0,4)
    {
	    c12[i]=0;
	    c21[i]=0;
	    c22[i]=0;
    }

    c12[3]=1;

    FOR(i,4,51)
    {
	c12[i]=c12[i-2]+c12[i-1];
	c21[i]=c21[i-2]+c21[i-1];
	c22[i]=c22[i-2]+c22[i-1];

	if (i%2==0)
		c21[i]++;
	else
		c22[i]++;
    }

    /*FOR(i,0,51)
    {
	    cout << " i=" << i << endl;

	    cout << " K1=" << k1[i] << " K2=" << k2[i] << endl;

	    cout << c12[i] << " " << c22[i] << " " << c21[i] << endl;
    }*/

    int k,x,n,m;
    string s1="";
    string s2="";

    cin >> k >> x >> n >> m;

    bool ok=false;

    //////  with no condition

    FOR(i,0,n/2+1)
	    FOR(j,0,m/2+1)
	    if (i*k1[k]+j*k2[k]==x)
	    {
		    FOR(q,0,i)
			    s1+="AC";
		    while (s1.size()<n)
			    s1+='A';

		    FOR(q,0,j)
			    s2+="AC";
		    while (s2.size()<m)
			    s2+='A';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    ////// first condition

    FOR(i,0,n)
	    s1+='A';

    FOR(i,0,m)
	    s2+='A';

       FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]==x)
	    {

		   if (ok) cout << "first" << endl;

		s2[m-1]='Z';
		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// second

	         FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c21[k]==x)
	    {

		    if (ok)
			    cout << "second" << endl;

		s1[0]='C';

		FOR(q,0,i)
			s1[q*2+2]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    //// third

	  FOR(i,0,(n-200)/2+1)
	    FOR(j,0,(m-200)/2+1)
	    if (i*k1[k]+j*k2[k]+c22[k]==x)
	    {

		s1[n-1]='Z';
		s2[0]='C';

		if (ok)
			cout << "third" << endl;
		//cout << i <<  " " << j << endl;

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// 1 + 2

	   FOR(i,0,(n-2)/2+1)
	    FOR(j,0,(m-2)/2+1)
	   {
	    if (i*k1[k]+j*k2[k]+c12[k]+(1-m%2)*c21[k]+c22[k]==x)
	    {
		    s1[0]='C';
		    s2[0]='C';

		    if (ok) cout << "1+2" << endl;

		FOR(q,0,i)
			s1[q*2+2]='C';
		FOR(q,0,j)
			s2[q*2+2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }
	   }

   //// 1 + 3

	   FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]+(1-m%2)*c22[k]==x)
	    {

		s2[0]='C';

		if (ok)
			cout << "1+3"<< endl;

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q*2+2)]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    cout << "Happy new year!" << endl;

    return 0;
}


//#pragma comment(linker, "/STACK:134217728")
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
//#include <ctime>
using namespace std;

typedef pair<int,int> PII;
typedef vector<int> VI;

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); --i)
#define CLEAR(a, b) memset(a, b, sizeof(a))
#define ALL(a) (a).begin(),(a).end()
#define PB push_back
#define MP make_pair
#define MOD 1000000007
#define INF 1000000007
#define y1 agaga
#define ll long long
#define pi acos(-1.0)

int n;
long long  c12[55];
long long  c21[55];
long long  c22[55];
long long k1[55];
long long k2[55];

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    ios::sync_with_stdio(false);

    k1[1]=1;
    k2[1]=0;

    k1[2]=0;
    k2[2]=1;

    FOR(i,3,51)
    {
	    k1[i]=k1[i-2]+k1[i-1];
	    k2[i]=k2[i-2]+k2[i-1];
    }

    ////////////

    FOR(i,0,4)
    {
	    c12[i]=0;
	    c21[i]=0;
	    c22[i]=0;
    }

    c12[3]=1;

    FOR(i,4,51)
    {
	c12[i]=c12[i-2]+c12[i-1];
	c21[i]=c21[i-2]+c21[i-1];
	c22[i]=c22[i-2]+c22[i-1];

	if (i%2==0)
		c21[i]++;
	else
		c22[i]++;
    }

    /*FOR(i,0,51)
    {
	    cout << " i=" << i << endl;

	    cout << " K1=" << k1[i] << " K2=" << k2[i] << endl;

	    cout << c12[i] << " " << c22[i] << " " << c21[i] << endl;
    }*/

    int k,x,n,m;
    string s1="";
    string s2="";

    cin >> k >> x >> n >> m;

    bool ok=false;

    //////  with no condition

    FOR(i,0,n/2+1)
	    FOR(j,0,m/2+1)
	    if (i*k1[k]+j*k2[k]==x)
	    {
		    FOR(q,0,i)
			    s1+="AC";
		    while (s1.size()<n)
			    s1+='A';

		    FOR(q,0,j)
			    s2+="AC";
		    while (s2.size()<m)
			    s2+='A';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    ////// first condition

    FOR(i,0,n)
	    s1+='A';

    FOR(i,0,m)
	    s2+='A';

       FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]==x)
	    {

		   if (ok) cout << "first" << endl;

		s2[m-1]='Z';
		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// second

	         FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c21[k]==x)
	    {

		s1[0]='C';

		FOR(q,0,i)
			s1[q*2+2]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    //// third

	  FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c22[k]==x)
	    {

		s1[n-1]='Z';
		s2[0]='C';

		//cout << i <<  " " << j << endl;

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// 1 + 2

	   FOR(i,0,(n-2)/2+1)
	    FOR(j,0,(m-2)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]==x)
	    {
		    s1[0]='C';
		    s2[0]='C';

		FOR(q,0,i)
			s1[q*2+3]='C';
		FOR(q,0,j)
			s2[q*2+3]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

   //// 1 + 3

	   FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]+c22[k]==x)
	    {

		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    cout << "Happy new year!" << endl;

    return 0;
}


//#pragma comment(linker, "/STACK:134217728")
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
//#include <ctime>
using namespace std;

typedef pair<int,int> PII;
typedef vector<int> VI;

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); --i)
#define CLEAR(a, b) memset(a, b, sizeof(a))
#define ALL(a) (a).begin(),(a).end()
#define PB push_back
#define MP make_pair
#define MOD 1000000007
#define INF 1000000007
#define y1 agaga
#define ll long long
#define pi acos(-1.0)

int n;
long long  c12[55];
long long  c21[55];
long long  c22[55];
long long k1[55];
long long k2[55];

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    ios::sync_with_stdio(false);

    k1[1]=1;
    k2[1]=0;

    k1[2]=0;
    k2[2]=1;

    FOR(i,3,51)
    {
	    k1[i]=k1[i-2]+k1[i-1];
	    k2[i]=k2[i-2]+k2[i-1];
    }

    ////////////

    FOR(i,0,4)
    {
	    c12[i]=0;
	    c21[i]=0;
	    c22[i]=0;
    }

    c12[3]=1;

    FOR(i,4,51)
    {
	c12[i]=c12[i-2]+c12[i-1];
	c21[i]=c21[i-2]+c21[i-1];
	c22[i]=c22[i-2]+c22[i-1];

	if (i%2==0)
		c21[i]++;
	else
		c22[i]++;
    }

    /*FOR(i,0,51)
    {
	    cout << " i=" << i << endl;

	    cout << " K1=" << k1[i] << " K2=" << k2[i] << endl;

	    cout << c12[i] << " " << c22[i] << " " << c21[i] << endl;
    }*/

    int k,x,n,m;
    string s1="";
    string s2="";

    cin >> k >> x >> n >> m;

    //////  with no condition

    FOR(i,0,n/2+1)
	    FOR(j,0,m/2+1)
	    if (i*k1[k]+j*k2[k]==x)
	    {
		    FOR(q,0,i)
			    s1+="AC";
		    while (s1.size()<n)
			    s1+='A';

		    FOR(q,0,j)
			    s2+="AC";
		    while (s2.size()<n)
			    s2+='A';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    ////// first condition

    FOR(i,0,n)
	    s1+='A';

    FOR(i,0,m)
	    s2+='A';

       FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]==x)
	    {

		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// second

	         FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c21[k]==x)
	    {

		s1[0]='C';

		FOR(q,0,i)
			s1[q*2+2]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    //// third

	  FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c22[k]==x)
	    {

		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// 1 + 2

	   FOR(i,0,(n-2)/2+1)
	    FOR(j,0,(m-2)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]==x)
	    {
		    s1[0]='C';
		    s2[0]='C';

		FOR(q,0,i)
			s1[q*2+3]='C';
		FOR(q,0,j)
			s2[q*2+3]='C';

		    cout << s1 << endl << " F " << s2 << endl;
		    return 0;
	    }

   //// 1 + 3

	   FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]+c22[k]==x)
	    {

		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    cout << "Happy new year!" << endl;

    return 0;
}


//#pragma comment(linker, "/STACK:134217728")
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
//#include <ctime>
using namespace std;

typedef pair<int,int> PII;
typedef vector<int> VI;

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); --i)
#define CLEAR(a, b) memset(a, b, sizeof(a))
#define ALL(a) (a).begin(),(a).end()
#define PB push_back
#define MP make_pair
#define MOD 1000000007
#define INF 1000000007
#define y1 agaga
#define ll long long
#define pi acos(-1.0)

int n;
long long  c12[55];
long long  c21[55];
long long  c22[55];
long long k1[55];
long long k2[55];

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    ios::sync_with_stdio(false);

    k1[1]=1;
    k2[1]=0;

    k1[2]=0;
    k2[2]=1;

    FOR(i,3,51)
    {
	    k1[i]=k1[i-2]+k1[i-1];
	    k2[i]=k2[i-2]+k2[i-1];
    }

    ////////////

    FOR(i,0,4)
    {
	    c12[i]=0;
	    c21[i]=0;
	    c22[i]=0;
    }

    c12[3]=1;

    FOR(i,4,51)
    {
	c12[i]=c12[i-2]+c12[i-1];
	c21[i]=c21[i-2]+c21[i-1];
	c22[i]=c22[i-2]+c22[i-1];

	if (i%2==0)
		c21[i]++;
	else
		c22[i]++;
    }

    /*FOR(i,0,51)
    {
	    cout << " i=" << i << endl;

	    cout << " K1=" << k1[i] << " K2=" << k2[i] << endl;

	    cout << c12[i] << " " << c22[i] << " " << c21[i] << endl;
    }*/

    int k,x,n,m;
    string s1="";
    string s2="";

    cin >> k >> x >> n >> m;

    //////  with no condition

    FOR(i,0,n/2+1)
	    FOR(j,0,m/2+1)
	    if (i*k1[k]+j*k2[k]==x)
	    {
		    FOR(q,0,i)
			    s1+="AC";
		    while (s1.size()<n)
			    s1+='A';

		    FOR(q,0,j)
			    s2+="AC";
		    while (s2.size()<m)
			    s2+='A';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    ////// first condition

    FOR(i,0,n)
	    s1+='A';

    FOR(i,0,m)
	    s2+='A';

       FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]==x)
	    {

		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// second

	         FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c21[k]==x)
	    {

		s1[0]='C';

		FOR(q,0,i)
			s1[q*2+2]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    //// third

	  FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c22[k]==x)
	    {

		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// 1 + 2

	   FOR(i,0,(n-2)/2+1)
	    FOR(j,0,(m-2)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]==x)
	    {
		    s1[0]='C';
		    s2[0]='C';

		FOR(q,0,i)
			s1[q*2+3]='C';
		FOR(q,0,j)
			s2[q*2+3]='C';

		    cout << s1 << endl << " F " << s2 << endl;
		    return 0;
	    }

   //// 1 + 3

	   FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]+c22[k]==x)
	    {

		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    cout << "Happy new year!" << endl;

    return 0;
}


//#pragma comment(linker, "/STACK:134217728")
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
//#include <ctime>
using namespace std;

typedef pair<int,int> PII;
typedef vector<int> VI;

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); --i)
#define CLEAR(a, b) memset(a, b, sizeof(a))
#define ALL(a) (a).begin(),(a).end()
#define PB push_back
#define MP make_pair
#define MOD 1000000007
#define INF 1000000007
#define y1 agaga
#define ll long long
#define pi acos(-1.0)

int n;
long long  c12[55];
long long  c21[55];
long long  c22[55];
long long k1[55];
long long k2[55];

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    ios::sync_with_stdio(false);

    k1[1]=1;
    k2[1]=0;

    k1[2]=0;
    k2[2]=1;

    FOR(i,3,51)
    {
	    k1[i]=k1[i-2]+k1[i-1];
	    k2[i]=k2[i-2]+k2[i-1];
    }

    ////////////

    FOR(i,0,4)
    {
	    c12[i]=0;
	    c21[i]=0;
	    c22[i]=0;
    }

    c12[3]=1;

    FOR(i,4,51)
    {
	c12[i]=c12[i-2]+c12[i-1];
	c21[i]=c21[i-2]+c21[i-1];
	c22[i]=c22[i-2]+c22[i-1];

	if (i%2==0)
		c21[i]++;
	else
		c22[i]++;
    }

    /*FOR(i,0,51)
    {
	    cout << " i=" << i << endl;

	    cout << " K1=" << k1[i] << " K2=" << k2[i] << endl;

	    cout << c12[i] << " " << c22[i] << " " << c21[i] << endl;
    }*/

    int k,x,n,m;
    string s1="";
    string s2="";

    cin >> k >> x >> n >> m;

    bool ok=!false;

    //////  with no condition

    FOR(i,0,n/2+1)
	    FOR(j,0,m/2+1)
	    if (i*k1[k]+j*k2[k]==x)
	    {
		    FOR(q,0,i)
			    s1+="AC";
		    while (s1.size()<n)
			    s1+='A';

		    FOR(q,0,j)
			    s2+="AC";
		    while (s2.size()<m)
			    s2+='A';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    ////// first condition

    FOR(i,0,n)
	    s1+='A';

    FOR(i,0,m)
	    s2+='A';

       FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]==x)
	    {

		   if (ok) cout << "first" << endl;

		s2[m-1]='Z';
		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// second

	         FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c21[k]==x)
	    {

		    if (ok)
			    cout << "second" << endl;

		s1[0]='C';

		FOR(q,0,i)
			s1[q*2+2]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    //// third

	  FOR(i,0,(n-200)/2+1)
	    FOR(j,0,(m-200)/2+1)
	    if (i*k1[k]+j*k2[k]+c22[k]==x)
	    {

		s1[n-1]='Z';
		s2[0]='C';

		if (ok)
			cout << "third" << endl;
		//cout << i <<  " " << j << endl;

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// 1 + 2

	   FOR(i,0,(n-2)/2+1)
	    FOR(j,0,(m-2)/2+1)
	   {
	    if (i*k1[k]+j*k2[k]+c12[k]+(1-m%2)*c21[k]+c22[k]==x)
	    {
		    s1[0]='C';
		    s2[0]='C';

		    if (ok) cout << "1+2" << endl;

		FOR(q,0,i)
			s1[q*2+2]='C';
		FOR(q,0,j)
			s2[q*2+2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }
	   }

   //// 1 + 3

	   FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]+(m!=51)*c22[k]==x)
	    {

		s2[0]='C';

		if (ok)
			cout << "1+3"<< endl;

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q*2+2)]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    cout << "Happy new year!" << endl;

    return 0;
}


//#pragma comment(linker, "/STACK:134217728")
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
//#include <ctime>
using namespace std;

typedef pair<int,int> PII;
typedef vector<int> VI;

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); --i)
#define CLEAR(a, b) memset(a, b, sizeof(a))
#define ALL(a) (a).begin(),(a).end()
#define PB push_back
#define MP make_pair
#define MOD 1000000007
#define INF 1000000007
#define y1 agaga
#define ll long long
#define pi acos(-1.0)

int n;
long long  c12[55];
long long  c21[55];
long long  c22[55];
long long k1[55];
long long k2[55];

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    ios::sync_with_stdio(false);

    k1[1]=1;
    k2[1]=0;

    k1[2]=0;
    k2[2]=1;

    FOR(i,3,51)
    {
	    k1[i]=k1[i-2]+k1[i-1];
	    k2[i]=k2[i-2]+k2[i-1];
    }

    ////////////

    FOR(i,0,4)
    {
	    c12[i]=0;
	    c21[i]=0;
	    c22[i]=0;
    }

    c12[3]=1;

    FOR(i,4,51)
    {
	c12[i]=c12[i-2]+c12[i-1];
	c21[i]=c21[i-2]+c21[i-1];
	c22[i]=c22[i-2]+c22[i-1];

	if (i%2==0)
		c21[i]++;
	else
		c22[i]++;
    }

    /*FOR(i,0,51)
    {
	    cout << " i=" << i << endl;

	    cout << " K1=" << k1[i] << " K2=" << k2[i] << endl;

	    cout << c12[i] << " " << c22[i] << " " << c21[i] << endl;
    }*/

    int k,x,n,m;
    string s1="";
    string s2="";

    cin >> k >> x >> n >> m;

    bool ok=false;

    //////  with no condition

    FOR(i,0,n/2+1)
	    FOR(j,0,m/2+1)
	    if (i*k1[k]+j*k2[k]==x)
	    {
		    FOR(q,0,i)
			    s1+="AC";
		    while (s1.size()<n)
			    s1+='A';

		    FOR(q,0,j)
			    s2+="AC";
		    while (s2.size()<m)
			    s2+='A';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    ////// first condition

    FOR(i,0,n)
	    s1+='A';

    FOR(i,0,m)
	    s2+='A';

       FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]==x)
	    {

		   if (ok) cout << "first" << endl;

		s2[m-1]='Z';
		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// second

	         FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c21[k]==x)
	    {

		s1[0]='C';

		FOR(q,0,i)
			s1[q*2+2]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    //// third

	  FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c22[k]==x)
	    {

		s1[n-1]='Z';
		s2[0]='C';

		//cout << i <<  " " << j << endl;

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// 1 + 2

	   FOR(i,0,(n-2)/2+1)
	    FOR(j,0,(m-2)/2+1)
	   {
	    if (i*k1[k]+j*k2[k]+c12[k]+c21[k]+c22[k]==x)
	    {
		    s1[0]='C';
		    s2[0]='C';

		FOR(q,0,i)
			s1[q*2+2]='C';
		FOR(q,0,j)
			s2[q*2+2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }
	   }

   //// 1 + 3

	   FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]+c22[k]==x)
	    {

		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    cout << "Happy new year!" << endl;

    return 0;
}


//#pragma comment(linker, "/STACK:134217728")
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
//#include <ctime>
using namespace std;

typedef pair<int,int> PII;
typedef vector<int> VI;

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); --i)
#define CLEAR(a, b) memset(a, b, sizeof(a))
#define ALL(a) (a).begin(),(a).end()
#define PB push_back
#define MP make_pair
#define MOD 1000000007
#define INF 1000000007
#define y1 agaga
#define ll long long
#define pi acos(-1.0)

int n;
long long  c12[55];
long long  c21[55];
long long  c22[55];
long long k1[55];
long long k2[55];

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    ios::sync_with_stdio(false);

    k1[1]=1;
    k2[1]=0;

    k1[2]=0;
    k2[2]=1;

    FOR(i,3,51)
    {
	    k1[i]=k1[i-2]+k1[i-1];
	    k2[i]=k2[i-2]+k2[i-1];
    }

    ////////////

    FOR(i,0,4)
    {
	    c12[i]=0;
	    c21[i]=0;
	    c22[i]=0;
    }

    c12[3]=1;

    FOR(i,4,51)
    {
	c12[i]=c12[i-2]+c12[i-1];
	c21[i]=c21[i-2]+c21[i-1];
	c22[i]=c22[i-2]+c22[i-1];

	if (i%2==0)
		c21[i]++;
	else
		c22[i]++;
    }

    /*FOR(i,0,51)
    {
	    cout << " i=" << i << endl;

	    cout << " K1=" << k1[i] << " K2=" << k2[i] << endl;

	    cout << c12[i] << " " << c22[i] << " " << c21[i] << endl;
    }*/

    int k,x,n,m;
    string s1="";
    string s2="";

    cin >> k >> x >> n >> m;

    bool ok=!false;

    //////  with no condition

    FOR(i,0,n/2+1)
	    FOR(j,0,m/2+1)
	    if (i*k1[k]+j*k2[k]==x)
	    {
		    FOR(q,0,i)
			    s1+="AC";
		    while (s1.size()<n)
			    s1+='A';

		    FOR(q,0,j)
			    s2+="AC";
		    while (s2.size()<m)
			    s2+='A';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    ////// first condition

    FOR(i,0,n)
	    s1+='A';

    FOR(i,0,m)
	    s2+='A';

       FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]==x)
	    {

		   if (ok) cout << "first" << endl;

		s2[m-1]='Z';
		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// second

	         FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c21[k]==x)
	    {

		    if (ok)
			    cout << "second" << endl;

		s1[0]='C';

		FOR(q,0,i)
			s1[q*2+2]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    //// third

	  FOR(i,0,(n-200)/2+1)
	    FOR(j,0,(m-200)/2+1)
	    if (i*k1[k]+j*k2[k]+c22[k]==x)
	    {

		s1[n-1]='Z';
		s2[0]='C';

		if (ok)
			cout << "third" << endl;
		//cout << i <<  " " << j << endl;

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// 1 + 2

	   FOR(i,0,(n-2)/2+1)
	    FOR(j,0,(m-2)/2+1)
	   {
	    if (i*k1[k]+j*k2[k]+c12[k]+(1-m%2)*c21[k]+c22[k]==x)
	    {
		    s1[0]='C';
		    s2[0]='C';

		    if (ok) cout << "1+2" << endl;

		FOR(q,0,i)
			s1[q*2+2]='C';
		FOR(q,0,j)
			s2[q*2+2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }
	   }

   //// 1 + 3

	   FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]+(m==51)*c22[k]==x)
	    {

		s2[0]='C';

		if (ok)
			cout << "1+3"<< endl;

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q*2+2)]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    cout << "Happy new year!" << endl;

    return 0;
}


//#pragma comment(linker, "/STACK:134217728")
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
//#include <ctime>
using namespace std;

typedef pair<int,int> PII;
typedef vector<int> VI;

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); --i)
#define CLEAR(a, b) memset(a, b, sizeof(a))
#define ALL(a) (a).begin(),(a).end()
#define PB push_back
#define MP make_pair
#define MOD 1000000007
#define INF 1000000007
#define y1 agaga
#define ll long long
#define pi acos(-1.0)

int n;
long long  c12[55];
long long  c21[55];
long long  c22[55];
long long k1[55];
long long k2[55];

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    ios::sync_with_stdio(false);

    k1[1]=1;
    k2[1]=0;

    k1[2]=0;
    k2[2]=1;

    FOR(i,3,51)
    {
	    k1[i]=k1[i-2]+k1[i-1];
	    k2[i]=k2[i-2]+k2[i-1];
    }

    ////////////

    FOR(i,0,4)
    {
	    c12[i]=0;
	    c21[i]=0;
	    c22[i]=0;
    }

    c12[3]=1;

    FOR(i,4,51)
    {
	c12[i]=c12[i-2]+c12[i-1];
	c21[i]=c21[i-2]+c21[i-1];
	c22[i]=c22[i-2]+c22[i-1];

	if (i%2==0)
		c21[i]++;
	else
		c22[i]++;
    }

    /*FOR(i,0,51)
    {
	    cout << " i=" << i << endl;

	    cout << " K1=" << k1[i] << " K2=" << k2[i] << endl;

	    cout << c12[i] << " " << c22[i] << " " << c21[i] << endl;
    }*/

    int k,x,n,m;
    string s1="";
    string s2="";

    cin >> k >> x >> n >> m;

    bool ok=false;

    //////  with no condition

    FOR(i,0,n/2+1)
	    FOR(j,0,m/2+1)
	    if (i*k1[k]+j*k2[k]==x)
	    {
		    FOR(q,0,i)
			    s1+="AC";
		    while (s1.size()<n)
			    s1+='A';

		    FOR(q,0,j)
			    s2+="AC";
		    while (s2.size()<m)
			    s2+='A';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    ////// first condition

    FOR(i,0,n)
	    s1+='A';

    FOR(i,0,m)
	    s2+='A';

       FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]==x)
	    {

		   if (ok) cout << "first" << endl;

		s2[m-1]='Z';
		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// second

	         FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c21[k]==x)
	    {

		s1[0]='C';

		FOR(q,0,i)
			s1[q*2+2]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    //// third

	  FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c22[k]==x)
	    {

		s1[n-1]='Z';
		s2[0]='C';

		//cout << i <<  " " << j << endl;

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// 1 + 2

	   FOR(i,0,(n-2)/2+1)
	    FOR(j,0,(m-2)/2+1)
	   {
	    if (i*k1[k]+j*k2[k]+c12[k]+c21[k]+c22[k]==x)
	    {
		    s1[0]='C';
		    s2[0]='C';

		FOR(q,0,i)
			s1[q*2+2]='C';
		FOR(q,0,j)
			s2[q*2+2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }
	   }

   //// 1 + 3

	   FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]+(1-m%2)*c22[k]==x)
	    {

		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    cout << "Happy new year!" << endl;

    return 0;
}


//#pragma comment(linker, "/STACK:134217728")
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
//#include <ctime>
using namespace std;

typedef pair<int,int> PII;
typedef vector<int> VI;

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); --i)
#define CLEAR(a, b) memset(a, b, sizeof(a))
#define ALL(a) (a).begin(),(a).end()
#define PB push_back
#define MP make_pair
#define MOD 1000000007
#define INF 1000000007
#define y1 agaga
#define ll long long
#define pi acos(-1.0)

int n;
long long  c12[55];
long long  c21[55];
long long  c22[55];
long long k1[55];
long long k2[55];

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    ios::sync_with_stdio(false);

    k1[1]=1;
    k2[1]=0;

    k1[2]=0;
    k2[2]=1;

    FOR(i,3,51)
    {
	    k1[i]=k1[i-2]+k1[i-1];
	    k2[i]=k2[i-2]+k2[i-1];
    }

    ////////////

    FOR(i,0,4)
    {
	    c12[i]=0;
	    c21[i]=0;
	    c22[i]=0;
    }

    c12[3]=1;

    FOR(i,4,51)
    {
	c12[i]=c12[i-2]+c12[i-1];
	c21[i]=c21[i-2]+c21[i-1];
	c22[i]=c22[i-2]+c22[i-1];

	if (i%2==0)
		c21[i]++;
	else
		c22[i]++;
    }

    /*FOR(i,0,51)
    {
	    cout << " i=" << i << endl;

	    cout << " K1=" << k1[i] << " K2=" << k2[i] << endl;

	    cout << c12[i] << " " << c22[i] << " " << c21[i] << endl;
    }*/

    int k,x,n,m;
    string s1="";
    string s2="";

    cin >> k >> x >> n >> m;

    bool ok=false;

    if (m!=51)
    {

    //////  with no condition

    FOR(i,0,n/2+1)
	    FOR(j,0,m/2+1)
	    if (i*k1[k]+j*k2[k]==x)
	    {
		    FOR(q,0,i)
			    s1+="AC";
		    while (s1.size()<n)
			    s1+='A';

		    FOR(q,0,j)
			    s2+="AC";
		    while (s2.size()<m)
			    s2+='A';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    ////// first condition

    FOR(i,0,n)
	    s1+='A';

    FOR(i,0,m)
	    s2+='A';

       FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]==x)
	    {

		   if (ok) cout << "first" << endl;

		s2[m-1]='Z';
		s2[0]='C';

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// second

	         FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c21[k]==x)
	    {

		s1[0]='C';

		FOR(q,0,i)
			s1[q*2+2]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    //// third

	  FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c22[k]==x)
	    {

		s1[n-1]='Z';
		s2[0]='C';

		//cout << i <<  " " << j << endl;

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[q*2+1]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }

    /// 1 + 2

	   FOR(i,0,(n-2)/2+1)
	    FOR(j,0,(m-2)/2+1)
	   {
	    if (i*k1[k]+j*k2[k]+c12[k]+(1-m%2)*c21[k]+c22[k]==x)
	    {
		    s1[0]='C';
		    s2[0]='C';

		    if (ok) cout << "1+2" << endl;

		FOR(q,0,i)
			s1[q*2+2]='C';
		FOR(q,0,j)
			s2[q*2+2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }
	   }

   //// 1 + 3

	   FOR(i,0,(n-1)/2+1)
	    FOR(j,0,(m-1)/2+1)
	    if (i*k1[k]+j*k2[k]+c12[k]+c22[k]==x)
	    {

		s2[0]='C';

		    if (ok) cout << "1+3" << endl;

		FOR(q,0,i)
			s1[q*2+1]='C';
		FOR(q,0,j)
			s2[(q+1)*2]='C';

		    cout << s1 << endl << s2 << endl;
		    return 0;
	    }
	    }

    cout << "Happy new year!" << endl;

    return 0;
}


#include <set>
#include <bitset>
#include <queue>
#include <deque>
#include <set>
#include <bitset>
#include <queue>
#include <deque>
#include <stack>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>

#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <cassert>

#include <vector>
#include <list>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#pragma comment(linker, "/STACK:96777216")
typedef long long ll;
typedef unsigned long long ull;
typedef double dd;
typedef short int sint;
using namespace std;

struct fibString {

    ll c1, c2;
    ll c11, c12, c21, c22;
    fibString() { c1 = c2 = c11 = c12 = c21 = c22 = 0; }
}F[51];

int max_ac (int len, char first, char last) {

    if (first == 'A' && last == 'C') {
        return len / 2;
    }
    if (first == 'A' || last == 'C') {
        return (len - 1) / 2;
    }
    return (len - 2) / 2;
}

string construct (int len, char first, char last, int ac) {

    string S;
    S += first;
    if (len == 1) return S;
    int acs = 0;
    while (S.length() != len-1) {
        if (acs == ac) S += 'B';
        else {
            if (S[S.length()-1] == 'A') { S += 'C'; acs++; }
            else S += 'A';
        }
    }
    S += last;
    return S;
}

int main()
{
    F[1].c1 = 1;
    F[2].c2 = 1;
    F[3].c1 = 1; F[3].c2 = 1; F[3].c12 = 1;
    for (int i=4; i<=50; i++) {
        F[i].c1 = F[i-2].c1 + F[i-1].c1;
        F[i].c2 = F[i-2].c2 + F[i-1].c2;
        F[i].c11 = F[i-2].c11 + F[i-1].c11;
        F[i].c12 = F[i-2].c12 + F[i-1].c12;
        F[i].c21 = F[i-2].c21 + F[i-1].c21;
        F[i].c22 = F[i-2].c22 + F[i-1].c22;

        if (i % 2) F[i].c22++;
        else F[i].c21++;
    }

    //cout << F[4].c1 << " " << F[4].c2 << endl;
    //cout << F[4].c11 << " " << F[4].c12 << " " << F[4].c21 << " " << F[4].c22 << endl;

    int k, x, n, m; cin >> k >> x >> n >> m;

    for (int z1=0;z1<3;z1++) for (int z2=0;z2<3;z2++) for (int z3=0;z3<3;z3++) for (int z4=0;z4<3;z4++) {

        char f1; if (z1 == 0) f1 = 'A'; if (z1 == 1) f1 = 'B'; if (z1 == 2) f1 = 'C';
        char f2; if (z2 == 0) f2 = 'A'; if (z2 == 1) f2 = 'B'; if (z2 == 2) f2 = 'C';
        char l1; if (z3 == 0) l1 = 'A'; if (z3 == 1) l1 = 'B'; if (z3 == 2) l1 = 'C';
        char l2; if (z4 == 0) l2 = 'A'; if (z4 == 1) l2 = 'B'; if (z4 == 2) l2 = 'C';
        if (n == 1 && f1 != l1) continue;
        if (m == 1 && f2 != l2) continue;

        int m1 = max_ac(n,f1,l1), m2 = max_ac(m,f2,l2);

        for (int i=0; i<=m1; i++) for (int j=0; j<=m2; j++) {

            ll result = F[k].c1*i + F[k].c2*j + F[k].c11*(l1 == 'A' && f1 == 'C') + F[k].c12*(l1 == 'A' && f2 == 'C') + F[k].c21*(l2 == 'A' && f1 == 'C') + F[k].c22*(l2 == 'A' && f2 == 'C');

            if (result == x) {

                cout << construct(n,f1,l1,i) << endl;
                cout << construct(m,f2,l2,j);
                return 0;
            }
        }
    }
    cout << "Happy New Year!";

    return 0;
}


#include <set>
#include <bitset>
#include <queue>
#include <deque>
#include <set>
#include <bitset>
#include <queue>
#include <deque>
#include <stack>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>

#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <cassert>

#include <vector>
#include <list>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#pragma comment(linker, "/STACK:96777216")
typedef long long ll;
typedef unsigned long long ull;
typedef double dd;
typedef short int sint;
using namespace std;

struct fibString {

    ll c1, c2;
    ll c11, c12, c21, c22;
    fibString() { c1 = c2 = c11 = c12 = c21 = c22 = 0; }
}F[51];

int max_ac (int len, char first, char last) {

    if (first == 'A' && last == 'C') {
        return len / 2;
    }
    if (first == 'A' || last == 'C') {
        return (len - 1) / 2;
    }
    return (len - 2) / 2;
}

string construct (int len, char first, char last, int ac) {

    string S;
    S += first;
    if (len == 1) return S;
    int acs = 0;
    while (S.length() != len-1) {
        if (acs == ac) S += 'B';
        else {
            if (S[S.length()-1] == 'A') { S += 'C'; acs++; }
            else S += 'A';
        }
    }
    S += last;
    return S;
}

int main()
{
    F[1].c1 = 1;
    F[2].c2 = 1;
    F[3].c1 = 1; F[3].c2 = 1; F[3].c12 = 1;
    for (int i=4; i<=50; i++) {
        F[i].c1 = F[i-2].c1 + F[i-1].c1;
        F[i].c2 = F[i-2].c2 + F[i-1].c2;
        F[i].c11 = F[i-2].c11 + F[i-1].c11;
        F[i].c12 = F[i-2].c12 + F[i-1].c12;
        F[i].c21 = F[i-2].c21 + F[i-1].c21;
        F[i].c22 = F[i-2].c22 + F[i-1].c22;

        if (i % 2) F[i].c22++;
        else F[i].c21++;
    }

    //cout << F[4].c1 << " " << F[4].c2 << endl;
    //cout << F[4].c11 << " " << F[4].c12 << " " << F[4].c21 << " " << F[4].c22 << endl;

    int k, x, n, m; cin >> k >> x >> n >> m;

    for (int z1=0;z1<3;z1++) for (int z2=0;z2<3;z2++) for (int z3=0;z3<3;z3++) for (int z4=0;z4<3;z4++) {

        char f1; if (z1 == 0) f1 = 'A'; if (z1 == 1) f1 = 'B'; if (z1 == 2) f1 = 'C';
        char f2; if (z2 == 0) f2 = 'A'; if (z2 == 1) f2 = 'B'; if (z2 == 2) f2 = 'C';
        char l1; if (z3 == 0) l1 = 'A'; if (z3 == 1) l1 = 'B'; if (z3 == 2) l1 = 'C';
        char l2; if (z4 == 0) l2 = 'A'; if (z4 == 1) l2 = 'B'; if (z4 == 2) l2 = 'C';
        if (n == 1 && f1 != l1) continue;
        if (m == 1 && f2 != l2) continue;

        int m1 = max_ac(n,f1,l1), m2 = max_ac(m,f2,l2);

        for (int i=0; i<=m1; i++) for (int j=0; j<=m2; j++) {

            ll result = F[k].c1*i + F[k].c2*j + F[k].c11*(l1 == 'A' && f1 == 'C') + F[k].c12*(l1 == 'A' && f2 == 'C') + F[k].c21*(l2 == 'A' && f1 == 'C') + F[k].c22*(l2 == 'A' && f2 == 'C');

            if (result == x) {

                cout << construct(n,f1,l1,i) << endl;
                cout << construct(m,f2,l2,j);
                return 0;
            }
        }
    }
    cout << "Happy new year!";

    return 0;
}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
#include <cmath>
#include <ctime>
#include <map>
#include <iterator>
#include <queue>
#include <list>
#include <cstdio>
#include <stack>
#include <set>
#include <functional>

using namespace std;

typedef long long ll;
typedef long double ld;

const int NMax = 300001;
const int INF = int(1e9);
const int cntTree = 262145;
const double eps = 1e-9;
const double PI = 3.141592653589793238462;
const int MOD = int(1e9);

#define MIN(x,y) ((x) > (y) ? (y) : (x))
#define MAX(x,y) ((x) > (y) ? (x) : (y))
#define SQR(x) ((x) * (x))
#define ABS(x) ((x) < (0) ? (-(x)) : (x))
#define SZ(x) (int) (x).size()

int n, m, k, x;
string ans1, ans2;
char lastchar[51], firstchar[51];
int cntAC[51];

string result(int k, int size, char first, char last)
{
	string ans = "";
	if (size - k * 2 > 1)
	{
		ans = first;
		for (int i = 1;i < (size - k * 2) / 2 + (size - k * 2) % 2;i++) ans += 'B';
		for (int i = 1;i <= k;i++) ans += "AC";
		for (int i = 1;i < (size - k * 2) / 2;i++) ans += 'B';
		ans += last;
		return ans;
	}
	if (size - k * 2 == 0)
	{
		if (first != 'A' || last != 'C') return ans;
		for (int i = 1;i <= k;i++) ans += "AC";
		return ans;
	}
	if (first != 'A' && last != 'C') return ans;
	if (first == 'A')
	{
		for (int i = 1;i <= k;i++) ans += "AC";
		ans += last;
		return ans;
	}
	if (last == 'C')
	{
		ans += first;
		for (int i = 1;i <= k;i++) ans += "AC";
		return ans;
	}
}

int main()
{
	scanf("%i%i%i%i", &k, &x, &n, &m);
	for (int i = 0;i <= n / 2;i++)
		for (char ch1 = 'A'; ch1 <= 'C';ch1++)
			for (char ch2 = 'A'; ch2 <= 'C';ch2++)
			{
				ans1 = result(i,n,ch1,ch2);
				if (SZ(ans1) == 0) continue;
				for (int j = 0;j <= m / 2;j++)
					for (char ch3 = 'A'; ch3 <= 'C';ch3++)
						for (char ch4 = 'A';ch4 <= 'C';ch4++)
						{
							ans2 = result(j,m,ch3,ch4);
							if (SZ(ans2) == 0) continue;
							lastchar[1] = ch2;
							firstchar[1] = ch1;
							lastchar[2] = ch4;
							firstchar[2] = ch3;
							cntAC[1] = i;
							cntAC[2] = j;
							bool flag = false;
							cntAC[k] = 0;
							for (int k1 = 3;k1 <= k;k1++)
							{
								lastchar[k1] = lastchar[k1 - 1];
								firstchar[k1] = firstchar[k1 - 2];
								cntAC[k1] = cntAC[k1 - 1] + cntAC[k1 - 2];
								if (lastchar[k1 - 2] == 'A' && firstchar[k1 - 1] == 'C') cntAC[k1]++;
								if (cntAC[k1] > x) break;
							}
							if (cntAC[k] == x)
							{
								printf("%s\n%s", ans1.c_str(), ans2.c_str());
								return 0;
							}
						}
			}
			cout << "Happy new year!";
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <cstring>
#include <math.h>
#include <algorithm>
#include <complex>

using namespace std;

#define file "file"
#define mp make_pair
#define pb push_back
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;

const int MAXN = 1e4 + 5;
const double EPS = 1e-9;
const int INF = 1000000 + 5;
const int MAXN2 = 1000 + 5;

int f[MAXN],s[MAXN];
ll cnt[MAXN][3][3];
ll cnt2[MAXN][2];

char p[3]={'A','B','C'};

char ls[3][3];

ll getCnt(int i,ll n)
{
	ll m1 = 0;
	if(ls[i][1] == 'A'){
		if(n&1) m1 = n / 2;
		else{
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
	}
	else{
		if(n&1){
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
		else{
			m1 = n / 2 - 1;
		}
	}

	return m1;
}

char ss[3][MAXN];

bool isGood(int v,int n,char f,char l,ll k)
{
	if(!k && n==2 && f=='A' && l=='C')
	{
		return false;
	}
	ss[v][0] = f;
	int i;
	for(i=1;i<n-1;i++)
	{
		if(ss[v][i-1] == 'A'){
			if(k){
				k--;
				ss[v][i] = 'C';
			}
			else{
				ss[v][i] = 'B';
			}
		}
		else{
			if(k){
				ss[v][i] = 'A';
			}
			else{
				ss[v][i] = 'B';
			}
		}
	}

	return true;
}

int main()
{
	//freopen(file".in","r",stdin); freopen(file".out","w",stdout);
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
	int k,n,m;
	ll x;
	cin>>k>>x>>n>>m;
	f[1] = 1;
	f[2] = 2;
	s[1] = 1;
	s[2] = 2;
	cnt2[1][1] = 1;
	cnt2[2][2] = 1;
	for(int i=3;i<=k;i++)
	{
		cnt2[i][1] = cnt2[i-1][1] + cnt2[i-2][1];
		cnt2[i][2] = cnt2[i-1][2] + cnt2[i-2][2];
		for(int j=1;j<3;j++){
			for(int h=1;h<3;h++){
				cnt[i][j][h] = cnt[i-1][j][h] + cnt[i-2][j][h];
			}
		}
		if(f[i-1] == 1){
			if(s[i-2] == 1){
				cnt[i][1][1]++;
			}
			else{
				cnt[i][2][1]++;
			}
		}
		else{
			if(s[i-2] == 1){
				cnt[i][1][2]++;
			}
			else{
				cnt[i][2][2]++;
			}
		}

		f[i] = f[i-2];
		s[i] = s[i-1];
	}

	ll t;
	ll m1,m2,xx;
	for(int i=0;i<3;i++){
		for(int j=0;j<3;j++){
			for(int i2=0;i2<3;i2++){
				for(int j2=0;j2<3;j2++){
					ls[1][1] = p[i];
					ls[1][2] = p[j];
					ls[2][1] = p[i2];
					ls[2][2] = p[j2];
					if(n==1) ls[1][2] = ls[1][1];
					if(m==1) ls[2][2] = ls[2][1];
					t = 0;
					for(int k1=1;k1<3;k1++){
						for(int k2=1;k2<3;k2++){
							if(ls[k1][2] == 'A' && ls[k2][1] == 'C')
							{
								t += cnt[k][k1][k2];
							}
						}
					}

					if(t > x) continue;
					if(n > 1){
						m1 = getCnt(1,n);
					}
					else{
						m1 = 0;
					}
					if(m > 1){
						m2 = getCnt(2,m);
					}
					else{
						m2 = 0;
					}
					if(t + m1 * cnt2[k][1] + m2 * cnt2[k][2] < x) continue;
					xx = x - t;

					for(ll m11 = 0;m11<=min(m1,xx/2 + 5);m11++)
					{
						ll m22 = xx - m11 * cnt2[k][1];
						if(m22 % cnt2[k][2] !=0) continue;
						m22 /= cnt2[k][2];
						if(m22 > m2) continue;
						if(isGood(1,n,ls[1][1],ls[1][2],m11) &&
							isGood(2,m,ls[2][1],ls[2][2],m22)){
							ss[1][0] = ls[1][1];
							ss[1][n-1] = ls[1][2];
							ss[2][0] = ls[2][1];
							ss[2][m-1] = ls[2][2];
							ss[1][n] = 0;
							ss[2][m] = 0;
							printf("%s\n%s\n",ss[1],ss[2]);
							return 0;
						}
					}

					for(ll m22 = 0;m22<=min(m2,xx/2 + 5);m22++)
					{
						ll m11= xx - m2 * cnt2[k][2];
						if(m11 % cnt2[k][1] !=0) continue;
						m11 /= cnt2[k][1];
						if(m11 > m1) continue;
						if(isGood(1,n,ls[1][1],ls[1][2],m11) &&
							isGood(2,m,ls[2][1],ls[2][2],m22)){
							ss[1][0] = ls[1][1];
							ss[1][n-1] = ls[1][2];
							ss[2][0] = ls[2][1];
							ss[2][m-1] = ls[2][2];
							ss[1][n] = 0;
							ss[2][m] = 0;
							printf("%s\n%s\n",ss[1],ss[2]);
							return 0;
						}
					}
				}
			}
		}
	}

	printf("Happy new year!");
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <cstring>
//#include <math.h>
#include <algorithm>
#include <complex>

using namespace std;

#define file "file"
#define mp make_pair
#define pb push_back
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;

const int MAXN = 1e4 + 5;
const double EPS = 1e-9;
const int INF = 1000000 + 5;
const int MAXN2 = 1000 + 5;

int f[MAXN],s[MAXN];
ll cnt[MAXN][3][3];
ll cnt2[MAXN][2];

char p[3]={'A','B','C'};

char ls[3][3];

ll getCnt(int i,ll n)
{
	ll m1 = 0;
	if(ls[i][1] == 'A'){
		if(n&1) m1 = n / 2;
		else{
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
	}
	else{
		if(n&1){
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
		else{
			m1 = n / 2 - 1;
		}
	}

	return m1;
}

char ss[3][MAXN];

bool isGood(int v,int n,char f,char l,ll k)
{
	if(!k && n==2 && f=='A' && l=='C')
	{
		return false;
	}
	ss[v][0] = f;
	int i;
	for(i=1;i<n-1;i++)
	{
		if(ss[v][i-1] == 'A'){
			if(k){
				k--;
				ss[v][i] = 'C';
			}
			else{
				ss[v][i] = 'B';
			}
		}
		else{
			if(k){
				ss[v][i] = 'A';
			}
			else{
				ss[v][i] = 'B';
			}
		}
	}

	return true;
}

int main()
{
	//freopen(file".in","r",stdin); freopen(file".out","w",stdout);
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
	int k,n,m;
	ll x;
	cin>>k>>x>>n>>m;
	f[1] = 1;
	f[2] = 2;
	s[1] = 1;
	s[2] = 2;
	cnt2[1][1] = 1;
	cnt2[2][2] = 1;
	for(int i=3;i<=k;i++)
	{
		cnt2[i][1] = cnt2[i-1][1] + cnt2[i-2][1];
		cnt2[i][2] = cnt2[i-1][2] + cnt2[i-2][2];
		for(int j=1;j<3;j++){
			for(int h=1;h<3;h++){
				cnt[i][j][h] = cnt[i-1][j][h] + cnt[i-2][j][h];
			}
		}
		if(f[i-1] == 1){
			if(s[i-2] == 1){
				cnt[i][1][1]++;
			}
			else{
				cnt[i][2][1]++;
			}
		}
		else{
			if(s[i-2] == 1){
				cnt[i][1][2]++;
			}
			else{
				cnt[i][2][2]++;
			}
		}

		f[i] = f[i-2];
		s[i] = s[i-1];
	}

	ll t;
	ll m1,m2,xx;
	for(int i=0;i<3;i++){
		for(int j=0;j<3;j++){
			for(int i2=0;i2<3;i2++){
				for(int j2=0;j2<3;j2++){
					ls[1][1] = p[i];
					ls[1][2] = p[j];
					ls[2][1] = p[i2];
					ls[2][2] = p[j2];
					if(n==1) ls[1][2] = ls[1][1];
					if(m==1) ls[2][2] = ls[2][1];
					t = 0;
					for(int k1=1;k1<3;k1++){
						for(int k2=1;k2<3;k2++){
							if(ls[k1][2] == 'A' && ls[k2][1] == 'C')
							{
								t += cnt[k][k1][k2];
							}
						}
					}

					if(t > x) continue;
					if(n > 1){
						m1 = getCnt(1,n);
					}
					else{
						m1 = 0;
					}
					if(m > 1){
						m2 = getCnt(2,m);
					}
					else{
						m2 = 0;
					}
					if(t + m1 * cnt2[k][1] + m2 * cnt2[k][2] < x) continue;
					xx = x - t;

					ll mm = min(m1*cnt2[k][1],xx);
					ll mmm[6] = {0,1,2,mm-2,mm-1,mm};
					for(int ii=0;ii<6;ii++)
					{
						ll m11 = mmm[ii];
						ll m22 = xx - m11 * cnt2[k][1];
						if(m22 % cnt2[k][2] !=0) continue;
						m22 /= cnt2[k][2];
						if(m22 > m2) continue;
						if(isGood(1,n,ls[1][1],ls[1][2],m11) &&
							isGood(2,m,ls[2][1],ls[2][2],m22)){
							ss[1][0] = ls[1][1];
							ss[1][n-1] = ls[1][2];
							ss[2][0] = ls[2][1];
							ss[2][m-1] = ls[2][2];
							ss[1][n] = 0;
							ss[2][m] = 0;
							printf("%s\n%s\n",ss[1],ss[2]);
							return 0;
						}
					}
				}
			}
		}
	}

	printf("Happy new year!");
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <cstring>
//#include <math.h>
#include <algorithm>
#include <complex>

using namespace std;

#define file "file"
#define mp make_pair
#define pb push_back
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;

const int MAXN = 1e4 + 5;
const double EPS = 1e-9;
const int INF = 1000000 + 5;
const int MAXN2 = 1000 + 5;

int f[MAXN],s[MAXN];
ll cnt[MAXN][3][3];
ll cnt2[MAXN][2];

char p[3]={'A','B','C'};

char ls[3][3];

ll getCnt(int i,ll n)
{
	ll m1 = 0;
	if(ls[i][1] == 'A'){
		if(n&1) m1 = n / 2;
		else{
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
	}
	else{
		if(n&1){
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
		else{
			m1 = n / 2 - 1;
		}
	}

	return m1;
}

char ss[3][MAXN];

bool isGood(int v,int n,char f,char l,ll k)
{
	if(!k && n==2 && f=='A' && l=='C')
	{
		return false;
	}
	int i;
	for(i=1;i<n-1;i++)
	{
		if(ss[v][i-1] == 'A'){
			if(k){
				k--;
				ss[v][i] = 'C';
			}
			else{
				ss[v][i] = 'B';
			}
		}
		else{
			if(k){
				ss[v][i] = 'A';
			}
			else{
				ss[v][i] = 'B';
			}
		}
	}

	return true;
}

int main()
{
	//freopen(file".in","r",stdin); freopen(file".out","w",stdout);
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
	int k,n,m;
	ll x;
	cin>>k>>x>>n>>m;
	f[1] = 1;
	f[2] = 2;
	s[1] = 1;
	s[2] = 2;
	cnt2[1][1] = 1;
	cnt2[2][2] = 1;
	for(int i=3;i<=k;i++)
	{
		cnt2[i][1] = cnt2[i-1][1] + cnt2[i-2][1];
		cnt2[i][2] = cnt2[i-1][2] + cnt2[i-2][2];
		for(int j=1;j<3;j++){
			for(int h=1;h<3;h++){
				cnt[i][j][h] = cnt[i-1][j][h] + cnt[i-2][j][h];
			}
		}
		if(f[i-1] == 1){
			if(s[i-2] == 1){
				cnt[i][1][1]++;
			}
			else{
				cnt[i][2][1]++;
			}
		}
		else{
			if(s[i-2] == 1){
				cnt[i][1][2]++;
			}
			else{
				cnt[i][2][2]++;
			}
		}

		f[i] = f[i-2];
		s[i] = s[i-1];
	}

	ll t;
	ll m1,m2,xx;
	for(int i=0;i<3;i++){
		for(int j=0;j<3;j++){
			for(int i2=0;i2<3;i2++){
				for(int j2=0;j2<3;j2++){
					ls[1][1] = p[i];
					ls[1][2] = p[j];
					ls[2][1] = p[i2];
					ls[2][2] = p[j2];
					if(n==1) ls[1][2] = ls[1][1];
					if(m==1) ls[2][2] = ls[2][1];
					t = 0;
					for(int k1=1;k1<3;k1++){
						for(int k2=1;k2<3;k2++){
							if(ls[k1][2] == 'A' && ls[k2][1] == 'C')
							{
								t += cnt[k][k1][k2];
							}
						}
					}

					if(t > x) continue;
					if(n > 1){
						m1 = getCnt(1,n);
					}
					else{
						m1 = 0;
					}
					if(m > 1){
						m2 = getCnt(2,m);
					}
					else{
						m2 = 0;
					}
					if(t + m1 * cnt2[k][1] + m2 * cnt2[k][2] < x) continue;
					xx = x - t;

					for(ll m11 = 0;m11<=min(m1,xx);m11++)
					{
						ll m22 = xx - m11 * cnt2[k][1];
						if(m22 % cnt2[k][2] !=0) continue;
						m22 /= cnt2[k][2];
						if(m22 > m2) continue;
						if(isGood(1,n,ls[1][1],ls[1][2],m11) &&
							isGood(2,m,ls[2][1],ls[2][2],m22)){
							ss[1][0] = ls[1][1];
							ss[1][n-1] = ls[1][2];
							ss[2][0] = ls[2][1];
							ss[2][m-1] = ls[2][2];
							ss[1][n] = 0;
							ss[2][m] = 0;
							printf("%s\n%s\n",ss[1],ss[2]);
							return 0;
						}
					}
				}
			}
		}
	}

	printf("Happy new year!");
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <cstring>
#include <math.h>
#include <algorithm>
#include <complex>

using namespace std;

#define file "file"
#define mp make_pair
#define pb push_back
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;

const int MAXN = 1e4 + 5;
const double EPS = 1e-9;
const int INF = 1000000 + 5;
const int MAXN2 = 1000 + 5;

int f[MAXN],s[MAXN];
ll cnt[MAXN][3][3];
ll cnt2[MAXN][2];

char p[3]={'A','B','C'};

char ls[3][3];

ll getCnt(int i,ll n)
{
	ll m1 = 0;
	if(ls[i][1] == 'A'){
		if(n&1) m1 = n / 2;
		else{
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
	}
	else{
		if(n&1){
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
		else{
			m1 = n / 2 - 1;
		}
	}

	return m1;
}

char ss[3][MAXN];

bool isGood(int v,int n,char f,char l,ll k)
{
	if(!k && n==2 && f=='A' && l=='C')
	{
		return false;
	}
	ss[v][0] = f;
	int i;
	for(i=1;i<n-1;i++)
	{
		if(ss[v][i-1] == 'A'){
			if(k){
				k--;
				ss[v][i] = 'C';
			}
			else{
				ss[v][i] = 'B';
			}
		}
		else{
			if(k){
				ss[v][i] = 'A';
			}
			else{
				ss[v][i] = 'B';
			}
		}
	}

	return true;
}

int main()
{
	//freopen(file".in","r",stdin); freopen(file".out","w",stdout);
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
	int k,n,m;
	ll x;
	cin>>k>>x>>n>>m;
	f[1] = 1;
	f[2] = 2;
	s[1] = 1;
	s[2] = 2;
	cnt2[1][1] = 1;
	cnt2[2][2] = 1;
	for(int i=3;i<=k;i++)
	{
		cnt2[i][1] = cnt2[i-1][1] + cnt2[i-2][1];
		cnt2[i][2] = cnt2[i-1][2] + cnt2[i-2][2];
		for(int j=1;j<3;j++){
			for(int h=1;h<3;h++){
				cnt[i][j][h] = cnt[i-1][j][h] + cnt[i-2][j][h];
			}
		}
		if(f[i-1] == 1){
			if(s[i-2] == 1){
				cnt[i][1][1]++;
			}
			else{
				cnt[i][2][1]++;
			}
		}
		else{
			if(s[i-2] == 1){
				cnt[i][1][2]++;
			}
			else{
				cnt[i][2][2]++;
			}
		}

		f[i] = f[i-2];
		s[i] = s[i-1];
	}

	ll t;
	ll m1,m2,xx;
	for(int i=0;i<3;i++){
		for(int j=0;j<3;j++){
			for(int i2=0;i2<3;i2++){
				for(int j2=0;j2<3;j2++){
					ls[1][1] = p[i];
					ls[1][2] = p[j];
					ls[2][1] = p[i2];
					ls[2][2] = p[j2];
					if(n==1) ls[1][2] = ls[1][1];
					if(m==1) ls[2][2] = ls[2][1];
					t = 0;
					for(int k1=1;k1<3;k1++){
						for(int k2=1;k2<3;k2++){
							if(ls[k1][2] == 'A' && ls[k2][1] == 'C')
							{
								t += cnt[k][k1][k2];
							}
						}
					}

					if(t > x) continue;
					if(n > 1){
						m1 = getCnt(1,n);
					}
					else{
						m1 = 0;
					}
					if(m > 1){
						m2 = getCnt(2,m);
					}
					else{
						m2 = 0;
					}
					if(t + m1 * cnt2[k][1] + m2 * cnt2[k][2] < x) continue;
					xx = x - t;

					for(ll m11 = 0;m11<=min(m1,xx/2);m11++)
					{
						ll m22 = xx - m11 * cnt2[k][1];
						if(m22 <0 || m22 % cnt2[k][2] !=0) continue;
						m22 /= cnt2[k][2];
						if(m11 * cnt2[k][1] + m22 * cnt2[k][2] != xx) continue;
						if(m22 > m2) continue;
						if(isGood(1,n,ls[1][1],ls[1][2],m11) &&
							isGood(2,m,ls[2][1],ls[2][2],m22)){
							ss[1][0] = ls[1][1];
							ss[1][n-1] = ls[1][2];
							ss[2][0] = ls[2][1];
							ss[2][m-1] = ls[2][2];
							ss[1][n] = 0;
							ss[2][m] = 0;
							printf("%s\n%s\n",ss[1],ss[2]);
							return 0;
						}
					}

					for(ll m22 = 0;m22<=min(m2,xx/2);m22++)
					{
						ll m11= xx - m2 * cnt2[k][2];
						if(m11 <0 || m11 % cnt2[k][1] !=0) continue;
						m11 /= cnt2[k][1];
						if(m11 > m1) continue;
						if(isGood(1,n,ls[1][1],ls[1][2],m11) &&
							isGood(2,m,ls[2][1],ls[2][2],m22)){
							ss[1][0] = ls[1][1];
							ss[1][n-1] = ls[1][2];
							ss[2][0] = ls[2][1];
							ss[2][m-1] = ls[2][2];
							ss[1][n] = 0;
							ss[2][m] = 0;
							printf("%s\n%s\n",ss[1],ss[2]);
							return 0;
						}
					}
				}
			}
		}
	}

	printf("Happy new year!");
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <cstring>
#include <math.h>
#include <algorithm>
#include <complex>

using namespace std;

#define file "file"
#define mp make_pair
#define pb push_back
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;

const int MAXN = 1e4 + 5;
const double EPS = 1e-9;
const int INF = 1000000 + 5;
const int MAXN2 = 1000 + 5;

int f[MAXN],s[MAXN];
ll cnt[MAXN][3][3];
ll cnt2[MAXN][2];

char p[3]={'A','B','C'};

char ls[3][3];

ll getCnt(int i,ll n)
{
	ll m1 = 0;
	if(ls[i][1] == 'A'){
		if(n&1) m1 = n / 2;
		else{
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
	}
	else{
		if(n&1){
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
		else{
			m1 = n / 2 - 1;
		}
	}

	return m1;
}

char ss[3][MAXN];

bool isGood(int v,int n,char f,char l,ll k)
{
	if(!k && n==2 && f=='A' && l=='C')
	{
		return false;
	}
	ss[v][0] = f;
	int i;
	for(i=1;i<n-1;i++)
	{
		if(ss[v][i-1] == 'A'){
			if(k){
				k--;
				ss[v][i] = 'C';
			}
			else{
				ss[v][i] = 'B';
			}
		}
		else{
			if(k){
				ss[v][i] = 'A';
			}
			else{
				ss[v][i] = 'B';
			}
		}
	}

	return true;
}

int main()
{
	//freopen(file".in","r",stdin); freopen(file".out","w",stdout);
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
	int k,n,m;
	ll x;
	cin>>k>>x>>n>>m;
	f[1] = 1;
	f[2] = 2;
	s[1] = 1;
	s[2] = 2;
	cnt2[1][1] = 1;
	cnt2[2][2] = 1;
	for(int i=3;i<=k;i++)
	{
		cnt2[i][1] = cnt2[i-1][1] + cnt2[i-2][1];
		cnt2[i][2] = cnt2[i-1][2] + cnt2[i-2][2];
		for(int j=1;j<3;j++){
			for(int h=1;h<3;h++){
				cnt[i][j][h] = cnt[i-1][j][h] + cnt[i-2][j][h];
			}
		}
		if(f[i-1] == 1){
			if(s[i-2] == 1){
				cnt[i][1][1]++;
			}
			else{
				cnt[i][2][1]++;
			}
		}
		else{
			if(s[i-2] == 1){
				cnt[i][1][2]++;
			}
			else{
				cnt[i][2][2]++;
			}
		}

		f[i] = f[i-2];
		s[i] = s[i-1];
	}

	ll t;
	ll m1,m2,xx;
	for(int i=0;i<3;i++){
		for(int j=0;j<3;j++){
			for(int i2=0;i2<3;i2++){
				for(int j2=0;j2<3;j2++){
					ls[1][1] = p[i];
					ls[1][2] = p[j];
					ls[2][1] = p[i2];
					ls[2][2] = p[j2];
					if(n==1) ls[1][2] = ls[1][1];
					if(m==1) ls[2][2] = ls[2][1];
					t = 0;
					for(int k1=1;k1<3;k1++){
						for(int k2=1;k2<3;k2++){
							if(ls[k1][2] == 'A' && ls[k2][1] == 'C')
							{
								t += cnt[k][k1][k2];
							}
						}
					}

					if(t > x) continue;
					if(n > 1){
						m1 = getCnt(1,n);
					}
					else{
						m1 = 0;
					}
					if(m > 1){
						m2 = getCnt(2,m);
					}
					else{
						m2 = 0;
					}
					if(t + m1 * cnt2[k][1] + m2 * cnt2[k][2] < x) continue;
					xx = x - t;

					for(ll m11 = 0;m11<=min(m1,xx/2);m11++)
					{
						ll m22 = xx - m11 * cnt2[k][1];
						if(m22 % cnt2[k][2] !=0) continue;
						m22 /= cnt2[k][2];
						if(m22 > m2) continue;
						if(isGood(1,n,ls[1][1],ls[1][2],m11) &&
							isGood(2,m,ls[2][1],ls[2][2],m22)){
							ss[1][0] = ls[1][1];
							ss[1][n-1] = ls[1][2];
							ss[2][0] = ls[2][1];
							ss[2][m-1] = ls[2][2];
							ss[1][n] = 0;
							ss[2][m] = 0;
							printf("%s\n%s\n",ss[1],ss[2]);
							return 0;
						}
					}

					for(ll m22 = 0;m22<=min(m2,xx/2);m22++)
					{
						ll m11= xx - m2 * cnt2[k][2];
						if(m11 % cnt2[k][1] !=0) continue;
						m11 /= cnt2[k][1];
						if(m11 > m1) continue;
						if(isGood(1,n,ls[1][1],ls[1][2],m11) &&
							isGood(2,m,ls[2][1],ls[2][2],m22)){
							ss[1][0] = ls[1][1];
							ss[1][n-1] = ls[1][2];
							ss[2][0] = ls[2][1];
							ss[2][m-1] = ls[2][2];
							ss[1][n] = 0;
							ss[2][m] = 0;
							printf("%s\n%s\n",ss[1],ss[2]);
							return 0;
						}
					}
				}
			}
		}
	}

	printf("Happy new year!");
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <cstring>
//#include <math.h>
#include <algorithm>
#include <complex>

using namespace std;

#define file "file"
#define mp make_pair
#define pb push_back
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;

const int MAXN = 1e4 + 5;
const double EPS = 1e-9;
const int INF = 1000000 + 5;
const int MAXN2 = 1000 + 5;

int f[MAXN],s[MAXN];
ll cnt[MAXN][3][3];

char p[3]={'A','B','C'};

char ls[3][3];

ll getCnt(int i,ll n)
{
	ll m1 = 0;
	if(ls[i][1] == 'A'){
		if(n&1) m1 = n / 2;
		else{
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
	}
	else{
		if(n&1){
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
		else{
			m1 = n / 2 - 1;
		}
	}

	return m1;
}

char ss[3][MAXN];

bool isGood(int v,int n,char f,char l,ll k)
{
	if(!k && n==2 && f=='A' && l=='C')
	{
		return false;
	}
	int i;
	for(i=1;i<n-1;i++)
	{
		if(ss[v][i-1] == 'A'){
			if(k){
				k--;
				ss[v][i] = 'C';
			}
			else{
				ss[v][i] = 'B';
			}
		}
		else{
			if(k){
				ss[v][i] = 'A';
			}
			else{
				ss[v][i] = 'B';
			}
		}
	}

	return true;
}

int main()
{
	//freopen(file".in","r",stdin); freopen(file".out","w",stdout);
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
	int k,n,m;
	ll x;
	cin>>k>>x>>n>>m;
	f[1] = 1;
	f[2] = 2;
	s[1] = 1;
	s[2] = 2;
	for(int i=3;i<=k;i++)
	{
		for(int j=1;j<3;j++){
			for(int h=1;h<3;h++){
				cnt[i][j][h] = cnt[i-1][j][h] + cnt[i-2][j][h];
			}
		}
		if(f[i-1] == 1){
			if(s[i-2] == 1){
				cnt[i][1][1]++;
			}
			else{
				cnt[i][2][1]++;
			}
		}
		else{
			if(s[i-2] == 1){
				cnt[i][1][2]++;
			}
			else{
				cnt[i][2][2]++;
			}
		}

		f[i] = f[i-2];
		s[i] = s[i-1];
	}

	ll t;
	ll m1,m2,xx;
	for(int i=0;i<3;i++){
		for(int j=0;j<3;j++){
			for(int i2=0;i2<3;i2++){
				for(int j2=0;j2<3;j2++){
					ls[1][1] = p[i];
					ls[1][2] = p[j];
					ls[2][1] = p[i2];
					ls[2][2] = p[j2];
					if(n==1) ls[1][2] = ls[1][1];
					if(m==1) ls[2][2] = ls[2][1];
					t = 0;
					for(int k1=1;k1<3;k1++){
						for(int k2=1;k2<3;k2++){
							if(ls[k1][2] == 'A' && ls[k2][1] == 'C')
							{
								t += cnt[k][k1][k2];
							}
						}
					}

					if(t > x) continue;
					if(n > 1){
						m1 = getCnt(1,n);
					}
					else{
						m1 = 0;
					}
					if(m > 1){
						m2 = getCnt(2,m);
					}
					else{
						m2 = 0;
					}
					if(t + m1 + m2 < x) continue;
					xx = x - t;

					for(ll m11 = 0;m11<=min(m1,xx);m11++)
					{
						ll m22 = xx - m11;
						if(m22 > m2) continue;
						if(isGood(1,n,ls[1][1],ls[1][2],m11) &&
							isGood(2,m,ls[2][1],ls[2][2],m22)){
							ss[1][0] = ls[1][1];
							ss[1][n-1] = ls[1][2];
							ss[2][0] = ls[2][1];
							ss[2][m-1] = ls[2][2];
							ss[1][n] = 0;
							ss[2][m] = 0;
							printf("%s\n%s\n",ss[1],ss[2]);
							return 0;
						}
					}
				}
			}
		}
	}

	printf("Happy new year!");
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <cstring>
#include <math.h>
#include <algorithm>
#include <complex>

using namespace std;

#define file "file"
#define mp make_pair
#define pb push_back
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;

const int MAXN = 1e4 + 5;
const double EPS = 1e-9;
const int INF = 1000000 + 5;
const int MAXN2 = 1000 + 5;

int f[MAXN],s[MAXN];
ll cnt[MAXN][3][3];
ll cnt2[MAXN][2];

char p[3]={'A','B','C'};

char ls[3][3];

ll getCnt(int i,ll n)
{
	ll m1 = 0;
	if(ls[i][1] == 'A'){
		if(n&1) m1 = n / 2;
		else{
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
	}
	else{
		if(n&1){
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
		else{
			m1 = n / 2 - 1;
		}
	}

	return m1;
}

char ss[3][MAXN];

bool isGood(int v,int n,char f,char l,ll k)
{
	if(!k && n==2 && f=='A' && l=='C')
	{
		return false;
	}
	ss[v][0] = f;
	int i;
	for(i=1;i<n-1;i++)
	{
		if(ss[v][i-1] == 'A'){
			if(k){
				k--;
				ss[v][i] = 'C';
			}
			else{
				ss[v][i] = 'B';
			}
		}
		else{
			if(k){
				ss[v][i] = 'A';
			}
			else{
				ss[v][i] = 'B';
			}
		}
	}

	return true;
}

int main()
{
	//freopen(file".in","r",stdin); freopen(file".out","w",stdout);
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
	int k,n,m;
	ll x;
	cin>>k>>x>>n>>m;
	f[1] = 1;
	f[2] = 2;
	s[1] = 1;
	s[2] = 2;
	cnt2[1][1] = 1;
	cnt2[2][2] = 1;
	for(int i=3;i<=k;i++)
	{
		cnt2[i][1] = cnt2[i-1][1] + cnt2[i-2][1];
		cnt2[i][2] = cnt2[i-1][2] + cnt2[i-2][2];
		for(int j=1;j<3;j++){
			for(int h=1;h<3;h++){
				cnt[i][j][h] = cnt[i-1][j][h] + cnt[i-2][j][h];
			}
		}
		if(f[i-1] == 1){
			if(s[i-2] == 1){
				cnt[i][1][1]++;
			}
			else{
				cnt[i][2][1]++;
			}
		}
		else{
			if(s[i-2] == 1){
				cnt[i][1][2]++;
			}
			else{
				cnt[i][2][2]++;
			}
		}

		f[i] = f[i-2];
		s[i] = s[i-1];
	}

	ll t;
	ll m1,m2,xx;
	for(int i=0;i<3;i++){
		for(int j=0;j<3;j++){
			for(int i2=0;i2<3;i2++){
				for(int j2=0;j2<3;j2++){
					ls[1][1] = p[i];
					ls[1][2] = p[j];
					ls[2][1] = p[i2];
					ls[2][2] = p[j2];
					if(n==1) ls[1][2] = ls[1][1];
					if(m==1) ls[2][2] = ls[2][1];
					t = 0;
					for(int k1=1;k1<3;k1++){
						for(int k2=1;k2<3;k2++){
							if(ls[k1][2] == 'A' && ls[k2][1] == 'C')
							{
								t += cnt[k][k1][k2];
							}
						}
					}

					if(t > x) continue;
					if(n > 1){
						m1 = getCnt(1,n);
					}
					else{
						m1 = 0;
					}
					if(m > 1){
						m2 = getCnt(2,m);
					}
					else{
						m2 = 0;
					}
					if(t + m1 * cnt2[k][1] + m2 * cnt2[k][2] < x) continue;
					xx = x - t;

					for(ll m11 = 0;m11<=min(m1 * cnt2[k][1],xx/2);m11++)
					{
						ll m22 = xx - m11 * cnt2[k][1];
						if(m22 <0 || m22 % cnt2[k][2] !=0) continue;
						m22 /= cnt2[k][2];
						if(m22 > m2) continue;
						if(isGood(1,n,ls[1][1],ls[1][2],m11) &&
							isGood(2,m,ls[2][1],ls[2][2],m22)){
							ss[1][0] = ls[1][1];
							ss[1][n-1] = ls[1][2];
							ss[2][0] = ls[2][1];
							ss[2][m-1] = ls[2][2];
							ss[1][n] = 0;
							ss[2][m] = 0;
							printf("%s\n%s\n",ss[1],ss[2]);
							return 0;
						}
					}

					for(ll m22 = 0;m22<=min(m2 * cnt2[k][2],xx/2);m22++)
					{
						ll m11= xx - m2 * cnt2[k][2];
						if(m11 <0 || m11 % cnt2[k][1] !=0) continue;
						m11 /= cnt2[k][1];
						if(m11 > m1) continue;
						if(isGood(1,n,ls[1][1],ls[1][2],m11) &&
							isGood(2,m,ls[2][1],ls[2][2],m22)){
							ss[1][0] = ls[1][1];
							ss[1][n-1] = ls[1][2];
							ss[2][0] = ls[2][1];
							ss[2][m-1] = ls[2][2];
							ss[1][n] = 0;
							ss[2][m] = 0;
							printf("%s\n%s\n",ss[1],ss[2]);
							return 0;
						}
					}
				}
			}
		}
	}

	printf("Happy new year!");
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <cstring>
#include <math.h>
#include <algorithm>
#include <complex>

using namespace std;

#define file "file"
#define mp make_pair
#define pb push_back
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;

const int MAXN = 1e4 + 5;
const double EPS = 1e-9;
const int INF = 1000000 + 5;
const int MAXN2 = 1000 + 5;

int f[MAXN],s[MAXN];
ll cnt[MAXN][3][3];
ll cnt2[MAXN][2];

char p[3]={'A','B','C'};

char ls[3][3];

ll getCnt(int i,ll n)
{
	ll m1 = 0;
	if(ls[i][1] == 'A'){
		if(n&1) m1 = n / 2;
		else{
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
	}
	else{
		if(n&1){
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
		else{
			m1 = n / 2 - 1;
		}
	}

	return m1;
}

char ss[3][MAXN];

bool isGood(int v,int n,char f,char l,ll k)
{
	if(!k && n==2 && f=='A' && l=='C')
	{
		return false;
	}
	ss[v][0] = f;
	int i;
	for(i=1;i<n-1;i++)
	{
		if(ss[v][i-1] == 'A'){
			if(k){
				k--;
				ss[v][i] = 'C';
			}
			else{
				ss[v][i] = 'B';
			}
		}
		else{
			if(k){
				ss[v][i] = 'A';
			}
			else{
				ss[v][i] = 'B';
			}
		}
	}

	return true;
}

int main()
{
	//freopen(file".in","r",stdin); freopen(file".out","w",stdout);
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
	int k,n,m;
	ll x;
	cin>>k>>x>>n>>m;
	f[1] = 1;
	f[2] = 2;
	s[1] = 1;
	s[2] = 2;
	cnt2[1][1] = 1;
	cnt2[2][2] = 1;
	for(int i=3;i<=k;i++)
	{
		cnt2[i][1] = cnt2[i-1][1] + cnt2[i-2][1];
		cnt2[i][2] = cnt2[i-1][2] + cnt2[i-2][2];
		for(int j=1;j<3;j++){
			for(int h=1;h<3;h++){
				cnt[i][j][h] = cnt[i-1][j][h] + cnt[i-2][j][h];
			}
		}
		if(f[i-1] == 1){
			if(s[i-2] == 1){
				cnt[i][1][1]++;
			}
			else{
				cnt[i][2][1]++;
			}
		}
		else{
			if(s[i-2] == 1){
				cnt[i][1][2]++;
			}
			else{
				cnt[i][2][2]++;
			}
		}

		f[i] = f[i-2];
		s[i] = s[i-1];
	}

	ll t;
	ll m1,m2,xx;
	for(int i=0;i<3;i++){
		for(int j=0;j<3;j++){
			for(int i2=0;i2<3;i2++){
				for(int j2=0;j2<3;j2++){
					ls[1][1] = p[i];
					ls[1][2] = p[j];
					ls[2][1] = p[i2];
					ls[2][2] = p[j2];
					if(n==1) ls[1][2] = ls[1][1];
					if(m==1) ls[2][2] = ls[2][1];
					t = 0;
					for(int k1=1;k1<3;k1++){
						for(int k2=1;k2<3;k2++){
							if(ls[k1][2] == 'A' && ls[k2][1] == 'C')
							{
								t += cnt[k][k1][k2];
							}
						}
					}

					if(t > x) continue;
					if(n > 1){
						m1 = getCnt(1,n);
					}
					else{
						m1 = 0;
					}
					if(m > 1){
						m2 = getCnt(2,m);
					}
					else{
						m2 = 0;
					}
					if(t + m1 * cnt2[k][1] + m2 * cnt2[k][2] < x) continue;
					xx = x - t;

					for(ll m11 = 0;m11<=min(m1 * cnt2[k][1],xx/2 + 5);m11++)
					{
						ll m22 = xx - m11 * cnt2[k][1];
						if(m22 <0 || m22 % cnt2[k][2] !=0) continue;
						m22 /= cnt2[k][2];
						if(m22 > m2) continue;
						if(isGood(1,n,ls[1][1],ls[1][2],m11) &&
							isGood(2,m,ls[2][1],ls[2][2],m22)){
							ss[1][0] = ls[1][1];
							ss[1][n-1] = ls[1][2];
							ss[2][0] = ls[2][1];
							ss[2][m-1] = ls[2][2];
							ss[1][n] = 0;
							ss[2][m] = 0;
							printf("%s\n%s\n",ss[1],ss[2]);
							return 0;
						}
					}

					for(ll m22 = 0;m22<=min(m2 * cnt2[k][2],xx/2 + 5);m22++)
					{
						ll m11= xx - m2 * cnt2[k][2];
						if(m11 <0 || m11 % cnt2[k][1] !=0) continue;
						m11 /= cnt2[k][1];
						if(m11 > m1) continue;
						if(isGood(1,n,ls[1][1],ls[1][2],m11) &&
							isGood(2,m,ls[2][1],ls[2][2],m22)){
							ss[1][0] = ls[1][1];
							ss[1][n-1] = ls[1][2];
							ss[2][0] = ls[2][1];
							ss[2][m-1] = ls[2][2];
							ss[1][n] = 0;
							ss[2][m] = 0;
							printf("%s\n%s\n",ss[1],ss[2]);
							return 0;
						}
					}
				}
			}
		}
	}

	printf("Happy new year!");
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <cstring>
//#include <math.h>
#include <algorithm>
#include <complex>

using namespace std;

#define file "file"
#define mp make_pair
#define pb push_back
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;

const int MAXN = 1e4 + 5;
const double EPS = 1e-9;
const int INF = 1000000 + 5;
const int MAXN2 = 1000 + 5;

int f[MAXN],s[MAXN];
ll cnt[MAXN][3][3];
ll cnt2[MAXN][2];

char p[3]={'A','B','C'};

char ls[3][3];

ll getCnt(int i,ll n)
{
	ll m1 = 0;
	if(ls[i][1] == 'A'){
		if(n&1) m1 = n / 2;
		else{
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
	}
	else{
		if(n&1){
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
		else{
			m1 = n / 2 - 1;
		}
	}

	return m1;
}

char ss[3][MAXN];

bool isGood(int v,int n,char f,char l,ll k)
{
	if(!k && n==2 && f=='A' && l=='C')
	{
		return false;
	}
	ss[v][0] = f;
	int i;
	for(i=1;i<n-1;i++)
	{
		if(ss[v][i-1] == 'A'){
			if(k){
				k--;
				ss[v][i] = 'C';
			}
			else{
				ss[v][i] = 'B';
			}
		}
		else{
			if(k){
				ss[v][i] = 'A';
			}
			else{
				ss[v][i] = 'B';
			}
		}
	}

	return true;
}

int main()
{
	//freopen(file".in","r",stdin); freopen(file".out","w",stdout);
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
	int k,n,m;
	ll x;
	cin>>k>>x>>n>>m;
	f[1] = 1;
	f[2] = 2;
	s[1] = 1;
	s[2] = 2;
	cnt2[1][1] = 1;
	cnt2[2][2] = 1;
	for(int i=3;i<=k;i++)
	{
		cnt2[i][1] = cnt2[i-1][1] + cnt2[i-2][1];
		cnt2[i][2] = cnt2[i-1][2] + cnt2[i-2][2];
		for(int j=1;j<3;j++){
			for(int h=1;h<3;h++){
				cnt[i][j][h] = cnt[i-1][j][h] + cnt[i-2][j][h];
			}
		}
		if(f[i-1] == 1){
			if(s[i-2] == 1){
				cnt[i][1][1]++;
			}
			else{
				cnt[i][2][1]++;
			}
		}
		else{
			if(s[i-2] == 1){
				cnt[i][1][2]++;
			}
			else{
				cnt[i][2][2]++;
			}
		}

		f[i] = f[i-2];
		s[i] = s[i-1];
	}

	ll t;
	ll m1,m2,xx;
	for(int i=0;i<3;i++){
		for(int j=0;j<3;j++){
			for(int i2=0;i2<3;i2++){
				for(int j2=0;j2<3;j2++){
					ls[1][1] = p[i];
					ls[1][2] = p[j];
					ls[2][1] = p[i2];
					ls[2][2] = p[j2];
					if(n==1) ls[1][2] = ls[1][1];
					if(m==1) ls[2][2] = ls[2][1];
					t = 0;
					for(int k1=1;k1<3;k1++){
						for(int k2=1;k2<3;k2++){
							if(ls[k1][2] == 'A' && ls[k2][1] == 'C')
							{
								t += cnt[k][k1][k2];
							}
						}
					}

					if(t > x) continue;
					if(n > 1){
						m1 = getCnt(1,n);
					}
					else{
						m1 = 0;
					}
					if(m > 1){
						m2 = getCnt(2,m);
					}
					else{
						m2 = 0;
					}
					if(t + m1 * cnt2[k][1] + m2 * cnt2[k][2] < x) continue;
					xx = x - t;

					for(ll m11 = xx/2;m11<=min(m1,xx/2+10);m11++)
					{
						ll m22 = xx - m11 * cnt2[k][1];
						if(m22 % cnt2[k][2] !=0) continue;
						m22 /= cnt2[k][2];
						if(m22 > m2) continue;
						if(isGood(1,n,ls[1][1],ls[1][2],m11) &&
							isGood(2,m,ls[2][1],ls[2][2],m22)){
							ss[1][0] = ls[1][1];
							ss[1][n-1] = ls[1][2];
							ss[2][0] = ls[2][1];
							ss[2][m-1] = ls[2][2];
							ss[1][n] = 0;
							ss[2][m] = 0;
							printf("%s\n%s\n",ss[1],ss[2]);
							return 0;
						}
					}
				}
			}
		}
	}

	printf("Happy new year!");
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <cstring>
//#include <math.h>
#include <algorithm>
#include <complex>

using namespace std;

#define file "file"
#define mp make_pair
#define pb push_back
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;

const int MAXN = 1e4 + 5;
const double EPS = 1e-9;
const int INF = 1000000 + 5;
const int MAXN2 = 1000 + 5;

int f[MAXN],s[MAXN];
ll cnt[MAXN][3][3];
ll cnt2[MAXN][2];

char p[3]={'A','B','C'};

char ls[3][3];

ll getCnt(int i,ll n)
{
	ll m1 = 0;
	if(ls[i][1] == 'A'){
		if(n&1) m1 = n / 2;
		else{
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
	}
	else{
		if(n&1){
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
		else{
			m1 = n / 2 - 1;
		}
	}

	return m1;
}

char ss[3][MAXN];

bool isGood(int v,int n,char f,char l,ll k)
{
	if(!k && n==2 && f=='A' && l=='C')
	{
		return false;
	}
	ss[v][0] = f;
	int i;
	for(i=1;i<n-1;i++)
	{
		if(ss[v][i-1] == 'A'){
			if(k){
				k--;
				ss[v][i] = 'C';
			}
			else{
				ss[v][i] = 'B';
			}
		}
		else{
			if(k){
				ss[v][i] = 'A';
			}
			else{
				ss[v][i] = 'B';
			}
		}
	}

	return true;
}

int main()
{
	//freopen(file".in","r",stdin); freopen(file".out","w",stdout);
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
	int k,n,m;
	ll x;
	cin>>k>>x>>n>>m;
	f[1] = 1;
	f[2] = 2;
	s[1] = 1;
	s[2] = 2;
	cnt2[1][1] = 1;
	cnt2[2][2] = 1;
	for(int i=3;i<=k;i++)
	{
		cnt2[i][1] = cnt2[i-1][1] + cnt2[i-2][1];
		cnt2[i][2] = cnt2[i-1][2] + cnt2[i-2][2];
		for(int j=1;j<3;j++){
			for(int h=1;h<3;h++){
				cnt[i][j][h] = cnt[i-1][j][h] + cnt[i-2][j][h];
			}
		}
		if(f[i-1] == 1){
			if(s[i-2] == 1){
				cnt[i][1][1]++;
			}
			else{
				cnt[i][2][1]++;
			}
		}
		else{
			if(s[i-2] == 1){
				cnt[i][1][2]++;
			}
			else{
				cnt[i][2][2]++;
			}
		}

		f[i] = f[i-2];
		s[i] = s[i-1];
	}

	ll t;
	ll m1,m2,xx;
	for(int i=0;i<3;i++){
		for(int j=0;j<3;j++){
			for(int i2=0;i2<3;i2++){
				for(int j2=0;j2<3;j2++){
					ls[1][1] = p[i];
					ls[1][2] = p[j];
					ls[2][1] = p[i2];
					ls[2][2] = p[j2];
					if(n==1) ls[1][2] = ls[1][1];
					if(m==1) ls[2][2] = ls[2][1];
					t = 0;
					for(int k1=1;k1<3;k1++){
						for(int k2=1;k2<3;k2++){
							if(ls[k1][2] == 'A' && ls[k2][1] == 'C')
							{
								t += cnt[k][k1][k2];
							}
						}
					}

					if(t > x) continue;
					if(n > 1){
						m1 = getCnt(1,n);
					}
					else{
						m1 = 0;
					}
					if(m > 1){
						m2 = getCnt(2,m);
					}
					else{
						m2 = 0;
					}
					if(t + m1 * cnt2[k][1] + m2 * cnt2[k][2] < x) continue;
					xx = x - t;

					for(ll m11 = max(0ll,xx/2 - 10);m11<=min(m1,xx/2+10);m11++)
					{
						ll m22 = xx - m11 * cnt2[k][1];
						if(m22 % cnt2[k][2] !=0) continue;
						m22 /= cnt2[k][2];
						if(m22 > m2) continue;
						if(isGood(1,n,ls[1][1],ls[1][2],m11) &&
							isGood(2,m,ls[2][1],ls[2][2],m22)){
							ss[1][0] = ls[1][1];
							ss[1][n-1] = ls[1][2];
							ss[2][0] = ls[2][1];
							ss[2][m-1] = ls[2][2];
							ss[1][n] = 0;
							ss[2][m] = 0;
							printf("%s\n%s\n",ss[1],ss[2]);
							return 0;
						}
					}
				}
			}
		}
	}

	printf("Happy new year!");
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <cstring>
//#include <math.h>
#include <algorithm>
#include <complex>

using namespace std;

#define file "file"
#define mp make_pair
#define pb push_back
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;

const int MAXN = 1e4 + 5;
const double EPS = 1e-9;
const int INF = 1000000 + 5;
const int MAXN2 = 1000 + 5;

int f[MAXN],s[MAXN];
ll cnt[MAXN][3][3];
ll cnt2[MAXN][2];

char p[3]={'A','B','C'};

char ls[3][3];

ll getCnt(int i,ll n)
{
	ll m1 = 0;
	if(ls[i][1] == 'A'){
		if(n&1) m1 = n / 2;
		else{
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
	}
	else{
		if(n&1){
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
		else{
			m1 = n / 2 - 1;
		}
	}

	return m1;
}

char ss[3][MAXN];

bool isGood(int v,int n,char f,char l,ll k)
{
	if(!k && n==2 && f=='A' && l=='C')
	{
		return false;
	}
	ss[v][0] = f;
	int i;
	for(i=1;i<n-1;i++)
	{
		if(ss[v][i-1] == 'A'){
			if(k){
				k--;
				ss[v][i] = 'C';
			}
			else{
				ss[v][i] = 'B';
			}
		}
		else{
			if(k){
				ss[v][i] = 'A';
			}
			else{
				ss[v][i] = 'B';
			}
		}
	}

	return true;
}

int main()
{
	//freopen(file".in","r",stdin); freopen(file".out","w",stdout);
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
	int k,n,m;
	ll x;
	cin>>k>>x>>n>>m;
	f[1] = 1;
	f[2] = 2;
	s[1] = 1;
	s[2] = 2;
	cnt2[1][1] = 1;
	cnt2[2][2] = 1;
	for(int i=3;i<=k;i++)
	{
		cnt2[i][1] = cnt2[i-1][1] + cnt2[i-2][1];
		cnt2[i][2] = cnt2[i-1][2] + cnt2[i-2][2];
		for(int j=1;j<3;j++){
			for(int h=1;h<3;h++){
				cnt[i][j][h] = cnt[i-1][j][h] + cnt[i-2][j][h];
			}
		}
		if(f[i-1] == 1){
			if(s[i-2] == 1){
				cnt[i][1][1]++;
			}
			else{
				cnt[i][2][1]++;
			}
		}
		else{
			if(s[i-2] == 1){
				cnt[i][1][2]++;
			}
			else{
				cnt[i][2][2]++;
			}
		}

		f[i] = f[i-2];
		s[i] = s[i-1];
	}

	ll t;
	ll m1,m2,xx;
	for(int i=0;i<3;i++){
		for(int j=0;j<3;j++){
			for(int i2=0;i2<3;i2++){
				for(int j2=0;j2<3;j2++){
					ls[1][1] = p[i];
					ls[1][2] = p[j];
					ls[2][1] = p[i2];
					ls[2][2] = p[j2];
					if(n==1) ls[1][2] = ls[1][1];
					if(m==1) ls[2][2] = ls[2][1];
					t = 0;
					for(int k1=1;k1<3;k1++){
						for(int k2=1;k2<3;k2++){
							if(ls[k1][2] == 'A' && ls[k2][1] == 'C')
							{
								t += cnt[k][k1][k2];
							}
						}
					}

					if(t > x) continue;
					if(n > 1){
						m1 = getCnt(1,n);
					}
					else{
						m1 = 0;
					}
					if(m > 1){
						m2 = getCnt(2,m);
					}
					else{
						m2 = 0;
					}
					if(t + m1 * cnt2[k][1] + m2 * cnt2[k][2] < x) continue;
					xx = x - t;

					for(ll m11 = 0;m11<=min(m1*cnt2[k][1],xx);m11++)
					{
						ll m22 = xx - m11 * cnt2[k][1];
						if(m22 % cnt2[k][2] !=0) continue;
						m22 /= cnt2[k][2];
						if(m22 > m2) continue;
						if(isGood(1,n,ls[1][1],ls[1][2],m11) &&
							isGood(2,m,ls[2][1],ls[2][2],m22)){
							ss[1][0] = ls[1][1];
							ss[1][n-1] = ls[1][2];
							ss[2][0] = ls[2][1];
							ss[2][m-1] = ls[2][2];
							ss[1][n] = 0;
							ss[2][m] = 0;
							printf("%s\n%s\n",ss[1],ss[2]);
							return 0;
						}
					}
				}
			}
		}
	}

	printf("Happy new year!");
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <cstring>
//#include <math.h>
#include <algorithm>
#include <complex>

using namespace std;

#define file "file"
#define mp make_pair
#define pb push_back
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;

const int MAXN = 1e4 + 5;
const double EPS = 1e-9;
const int INF = 1000000 + 5;
const int MAXN2 = 1000 + 5;

int f[MAXN],s[MAXN];
ll cnt[MAXN][3][3];

char p[3]={'A','B','C'};

char ls[3][3];

ll getCnt(int i,ll n)
{
	int m1 = 0;
	if(ls[i][1] == 'A'){
		if(n&1) m1 = n / 2;
		else{
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
	}
	else{
		if(n&1){
			if(ls[i][2] == 'C') m1 = n / 2;
			else m1 = n / 2 - 1;
		}
		else{
			m1 = n / 2 - 1;
		}
	}

	return m1;
}

char ss[3][MAXN];

bool isGood(int v,int n,char f,char l,ll k)
{
	if(!k && n==2 && f=='A' && l=='C')
	{
		return false;
	}
	int i;
	for(i=1;i<n-1;i++)
	{
		if(ss[v][i-1] == 'A'){
			if(k){
				k--;
				ss[v][i] = 'C';
			}
			else{
				ss[v][i] = 'B';
			}
		}
		else{
			if(k){
				ss[v][i] = 'A';
			}
			else{
				ss[v][i] = 'B';
			}
		}
	}

	return true;
}

int main()
{
	//freopen(file".in","r",stdin); freopen(file".out","w",stdout);
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
	int k,n,m;
	ll x;
	cin>>k>>x>>n>>m;
	f[1] = 1;
	f[2] = 2;
	s[1] = 1;
	s[2] = 2;
	for(int i=3;i<=k;i++)
	{
		for(int j=1;j<3;j++){
			for(int h=1;h<3;h++){
				cnt[i][j][h] = cnt[i-1][j][h] + cnt[i-2][j][h];
			}
		}
		if(f[i-1] == 1){
			if(s[i-2] == 1){
				cnt[i][1][1]++;
			}
			else{
				cnt[i][2][1]++;
			}
		}
		else{
			if(s[i-2] == 1){
				cnt[i][1][2]++;
			}
			else{
				cnt[i][2][2]++;
			}
		}

		f[i] = f[i-2];
		s[i] = s[i-1];
	}

	ll t;
	ll m1,m2,xx;
	for(int i=0;i<3;i++){
		for(int j=0;j<3;j++){
			for(int i2=0;i2<3;i2++){
				for(int j2=0;j2<3;j2++){
					ls[1][1] = p[i];
					ls[1][2] = p[j];
					ls[2][1] = p[i2];
					ls[2][2] = p[j2];
					if(n==1) ls[1][2] = ls[1][1];
					if(m==1) ls[2][2] = ls[2][1];
					t = 0;
					for(int k1=1;k1<3;k1++){
						for(int k2=1;k2<3;k2++){
							if(ls[k1][2] == 'A' && ls[k2][1] == 'C')
							{
								t += cnt[k][k1][k2];
							}
						}
					}

					if(t > x) continue;
					if(n > 1){
						m1 = getCnt(1,n);
					}
					else{
						m1 = 0;
					}
					if(m > 1){
						m2 = getCnt(2,m);
					}
					else{
						m2 = 0;
					}
					if(t + m1 + m2 < x) continue;
					xx = x - t;

					for(ll m11 = min(m1,xx);m11<=m1;m11++)
					{
						ll m22 = xx - m11;
						if(isGood(1,n,ls[1][1],ls[1][2],m11) &&
							isGood(2,m,ls[2][1],ls[2][2],m22)){
							ss[1][0] = ls[1][1];
							ss[1][n-1] = ls[1][2];
							ss[2][0] = ls[2][1];
							ss[2][m-1] = ls[2][2];
							ss[1][n] = 0;
							ss[2][m] = 0;
							printf("%s\n%s\n",ss[1],ss[2]);
							return 0;
						}
					}
				}
			}
		}
	}

	printf("Happy new year!");
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <ctime>
#include <cmath>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <cstring>
using namespace std;

#define pb push_back
#define rs resize
#define mp make_pair
#define inf 1e9
#define pi 3.1415926535897932384626433832795
#define sz(a) (a).size()
#define Sort(a) sort((a).begin(), (a).end())
#define Reverse(a) reverse((a).begin(), (a).end())
#define sf scanf
#define pf printf
#define ms(a, x) memset((a), (x), sizeof(a))

typedef vector <int> vi;
typedef vector <vi> vvi;
typedef vector <vvi> vvvi;
typedef vector <vvvi> vvvvi;
typedef vector <bool> vb;
typedef vector <vb> vvb;
typedef vector <vvb> vvvb;
typedef vector <vvvb> vvvvb;
typedef long long ll;
typedef vector <ll> vl;
typedef vector <vl> vvl;
typedef vector <vvl> vvvl;
typedef vector <vvvl> vvvvl;
typedef pair <int, int> ii;
typedef vector <ii> vii;
typedef vector <vii> vvii;
typedef pair <int, ll> il;
typedef vector <il> vil;
typedef vector <vil> vvil;
typedef pair <ll, int> li;
typedef vector <li> vli;
typedef vector <vli> vvli;
typedef set <int> si;
typedef set <li> sli;
typedef set <il> sil;
typedef vector <string> vs;
typedef vector <vs> vvs;
typedef vector <vvs> vvvs;
typedef map <string, int> msi;
typedef map <char, int> mci;
typedef pair <ll, ll> pll;

struct data
{
    ll c_s1, c_s2;
    ll s1_to_s2, s2_to_s1, s1_to_s1, s2_to_s2;
    bool f, e;

    data() : c_s1(0), c_s2(0), s1_to_s2(0), s2_to_s1(0), f(0), e(0), s1_to_s1(0), s2_to_s2(0) {}
};

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    int k, x, n, m;
    cin >> k >> x >> n >> m;
    vector <data> a(k + 1);
    a[1].c_s1 = 1;
    a[1].c_s2 = 0;
    a[1].s1_to_s2 = 0;
    a[1].s2_to_s1 = 0;
    a[1].s1_to_s1 = 0;
    a[1].s2_to_s2 = 0;
    a[1].f = a[1].e = 0;
    a[2].c_s1 = 0;
    a[2].c_s2 = 1;
    a[2].s1_to_s2 = 0;
    a[2].s2_to_s1 = 0;
    a[2].s1_to_s1 = 0;
    a[2].s2_to_s2 = 0;
    a[2].f = a[2].e = 1;
    for (int i = 3; i <= k; ++i)
    {
        a[i].c_s1 = a[i - 2].c_s1 + a[i - 1].c_s1;
        a[i].c_s2 = a[i - 2].c_s2 + a[i - 1].c_s2;
        a[i].s1_to_s2 = a[i - 2].s1_to_s2 + a[i - 1].s1_to_s2 + (a[i - 2].e == 0 && a[i - 1].f == 1);
        a[i].s1_to_s1 = a[i - 2].s1_to_s1 + a[i - 1].s1_to_s1 + (a[i - 2].e == 0 && a[i - 1].f == 0);
        a[i].s2_to_s2 = a[i - 2].s2_to_s2 + a[i - 1].s2_to_s2 + (a[i - 2].e == 1 && a[i - 1].f == 1);
        a[i].s2_to_s1 = a[i - 2].s2_to_s1 + a[i - 1].s2_to_s1 + (a[i - 2].e == 1 && a[i - 1].f == 0);
        a[i].f = a[i - 2].f;
        a[i].e = a[i - 1].e;
    }
    bool q[16];
    ms(q, 0);
    for (int mask = 0; mask < 16; ++mask)
    {
        if (mask == 9)
            continue;
        int m1 = mask;
        ll x1 = x;
        if (m1 % 2 == 1)
        {
            x1 -= a[k].s1_to_s1;
        }
        m1 /= 2;
        if (m1 % 2 == 1)
        {
            x1 -= a[k].s1_to_s2;
        }
        m1 /= 2;
        if (m1 % 2 == 1)
        {
            continue;
        }
        m1 /= 2;
        if (m1 % 2 == 1)
        {
            x1 -= a[k].s2_to_s2;
        }
        int n1 = n;
        m1 = m;
        if (mask % 4 != 0)
        {
            n1--;
        }
        if (mask / 4 != 0)
        {
            m1--;
        }
        if (mask % 2 == 1 || mask / 4 % 2 == 1)
        {
            n1--;
        }
        if (mask / 2 % 2 == 1 || mask / 8 % 2 == 1)
        {
            m1--;
        }
        for (int i = 0; i * 2 <= n1; ++i)
        {
            for (int j = 0; j * 2 <= m1; ++j)
            {
                if (x1 == (ll)i * a[k].c_s1 + (ll)j * a[k].c_s2)
                {
                    if (mask % 2 == 1 || (mask / 4) % 2 == 1)
                    {
                        cout << 'C';
                    }
                    for (int t = 0; t < i; ++t)
                    {
                        cout << "AC";
                    }
                    for (int t = 0; t < n1 - i * 2; ++t)
                    {
                        cout << "B";
                    }
                    if (mask % 4 != 0)
                    {
                        cout << 'A';
                    }
                    cout << endl;
                    if (mask / 2 % 2 == 1 || mask / 8 % 2 == 1)
                    {
                        cout << 'C';
                    }
                    for (int t = 0; t < j; ++t)
                    {
                        cout << "AC";
                    }
                    for (int t = 0; t < m1 - j * 2; ++t)
                    {
                        cout << "B";
                    }
                    if (mask / 4 != 0)
                    {
                        cout << 'A';
                    }
                    return 0;
                }
            }
        }
    }
    cout << "Happy new year!";
    return 0;
}