#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[1].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 / 4 != 0)
                    {
                        cout << 'C';
                    }
                    for (int t = 0; t < j; ++t)
                    {
                        cout << "AC";
                    }
                    for (int t = 0; t < m1 - j * 2; ++t)
                    {
                        cout << "B";
                    }
                    if (mask / 2 % 2 == 1 || mask / 8 % 2 == 1)
                    {
                        cout << 'A';
                    }
                    return 0;
                }
            }
        }
    }
    cout << "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 / 4 != 0)
                    {
                        cout << 'C';
                    }
                    for (int t = 0; t < j; ++t)
                    {
                        cout << "AC";
                    }
                    for (int t = 0; t < m1 - j * 2; ++t)
                    {
                        cout << "B";
                    }
                    if (mask / 2 % 2 == 1 || mask / 8 % 2 == 1)
                    {
                        cout << 'A';
                    }
                    return 0;
                }
            }
        }
    }
    cout << "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 || mask == 11 || mask == 13 || mask == 6 || mask == 7 || mask == 14)
            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)
        {
            x1 -= a[k].s2_to_s1;
        }
        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;
}


// CF.cpp : Defines the entry point for the console application.
//
#include <vector>
#include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>

#define PB push_back
#define MP make_pair
#define L(o) (size_t)(o.size())
#define FOR(i,a,b) for(int i = (a); (i) < (b); ++(i))

using namespace std;

class Item
{
public:
	char first, last;
	long long amount;
	Item(char f, char l, long long a): first(f), last(l), amount(a)
	{ }
};

vector<Item> start1, start2;

int k, x, n, m;

int getNumber(Item one, Item two)
{
	if (n == 1)
		one.last = one.first;
	if (m == 1)
		two.last = two.first;
	if (n == 2 && one.first == 'A' && one.last == 'C')
		one.amount = 1;
	if (m == 2 && two.first == 'A' && two.last == 'C')
		two.amount = 1;
	Item t = one;
	//cout << t.first << " " << t.last << " " << t.amount << endl;
	t = two;
	//cout << t.first << " " << t.last << " " << t.amount << endl;

	vector<Item> b;
	b.reserve(k);
	b.PB(one);
	b.PB(two);
	FOR(i,2,k)
	{
		b.PB(Item(b[i-2].first, b[i-1].last, b[i-2].amount + b[i-1].amount + (long long)(b[i-2].last=='A' && b[i-1].first == 'C')));
		if (b[i].amount > x)
			return -1;
	}
	//cout << "Can get " << b[k-1].amount << endl;
	return b[k-1].amount;
}

string genAnswer(Item item, int len, bool &can)
{
	string a(len, 'B');
	a[len-1] = item.last,a[0] = item.first;
	int r = item.amount;
	for (int i = (item.first == 'A') ? 0 : 1;
		i < len - (item.last == 'C' ? 1 : 2) && r > 0;
		i += 2, --r)
	{
		a[i] = 'A';
		a[i+1] = 'C';
	}
	if (r > 0)
		can = false;
	return a;
}

static const string abc = "ABC";
int len = abc.size();

int main(int argc, char* argv[])
{
	cin >> k >> x >> n >> m;

	FOR(l1,0,len)
		FOR(l2,0,len)
			FOR(c1,0,max(max((n + 1)/2, (m + 1)/2),1))
			{
				Item t(abc[l1], abc[l2], c1);
				if (c1 * 2 <= n)
					start1.PB(t);
				if (c1 * 2 <= m)
					start2.PB(t);
			}
	//cout << "Generated " << L(start) << " items " << endl;
	int ln1 = L(start1), ln2 = L(start2);
	int fail = 0;
	FOR(i,0,ln1)
		FOR(j,0,ln2)
		if (getNumber(start1[i], start2[j]) == x)
		{
			++fail;
			bool can(1);
			string ans1(genAnswer(start1[i], n, can));
			string ans2(genAnswer(start2[j], m, can));
			if (!can)
				continue;
			cout << ans1 << endl;
			cout << ans2 << endl;
		//	cout << fail << endl;
			return 0;
		}
	cout << "Happy new year!" << endl;
	//		cout << fail << endl;
	return 0;
}


// CF.cpp : Defines the entry point for the console application.
//
#include <vector>
#include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>

#define PB push_back
#define MP make_pair
#define L(o) (size_t)(o.size())
#define FOR(i,a,b) for(int i = (a); (i) < (b); ++(i))

using namespace std;

class Item
{
public:
	char first, last;
	int amount;
	Item(char f, char l, int a): first(f), last(l), amount(a)
	{ }
};

vector<Item> start;

int k, x, n, m;

int getNumber(Item one, Item two)
{
	if (n == 1)
		one.last = one.first;
	if (m == 1)
		two.last = two.first;
	if (n == 2 && one.first == 'A' && one.last == 'C')
		++one.amount;
	if (m == 2 && two.first == 'A' && two.last == 'C')
		++two.amount;
	Item t = one;
	//cout << t.first << " " << t.last << " " << t.amount << endl;
	t = two;
//	cout << t.first << " " << t.last << " " << t.amount << endl;

	vector<Item> b;
	b.PB(one);
	b.PB(two);
	FOR(i,2,k)
		b.PB(Item(b[i-2].first, b[i-1].last, b[i-2].amount + b[i-1].amount + (int)(b[i-2].last=='A' && b[i-1].first == 'C')));
	//cout << "Can get " << b[k-1].amount << endl;
	return b[k-1].amount;
}

string genAnswer(Item item, int len)
{
	string a(len, 'B');
	a[0] = item.first,a[len-1] = item.last;
	for (int i = 1, r = item.amount; i < len - 2; i += 2)
	{
		a[i] = 'A';
		a[i+1] = 'C';
		--r;
		if (r == 0)
			break;
	}
	return a;
}

static const string abc = "ABC";
int len = abc.size();

int main(int argc, char* argv[])
{
	cin >> k >> x >> n >> m;

	FOR(l1,0,len)
		FOR(l2,0,len)
			FOR(c1,0,max(n/2,1))
			{
				Item t(abc[l1], abc[l2], c1);
				start.PB(t);
			}
	//cout << "Generated " << L(start) << " items " << endl;
	int ln = start.size();
	FOR(i,0,ln)
		FOR(j,i,ln)
		if (getNumber(start[i], start[j]) == x)
		{
			cout << genAnswer(start[i], n) << endl;
			cout << genAnswer(start[j], m) << endl;
			return 0;
		}
	cout << "Happy new year!" << endl;
	return 0;
}


// CF.cpp : Defines the entry point for the console application.
//
#include <vector>
#include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>

#define PB push_back
#define MP make_pair
#define L(o) (size_t)(o.size())
#define FOR(i,a,b) for(int i = (a); (i) < (b); ++(i))

using namespace std;

class Item
{
public:
	char first, last;
	int amount;
	Item(char f, char l, int a): first(f), last(l), amount(a)
	{ }
};

vector<Item> start;

int k, x, n, m;

int getNumber(Item one, Item two)
{
	if (n == 1)
		one.last = one.first;
	if (m == 1)
		two.last = two.first;
	if (n == 2 && one.first == 'A' && one.last == 'C')
		++one.amount;
	if (m == 2 && two.first == 'A' && two.last == 'C')
		++two.amount;
	Item t = one;
	//cout << t.first << " " << t.last << " " << t.amount << endl;
	t = two;
//	cout << t.first << " " << t.last << " " << t.amount << endl;

	vector<Item> b;
	b.PB(one);
	b.PB(two);
	FOR(i,2,k)
		b.PB(Item(b[i-2].first, b[i-1].last, b[i-2].amount + b[i-1].amount + (int)(b[i-2].last=='A' && b[i-1].first == 'C')));
	//cout << "Can get " << b[k-1].amount << endl;
	return b[k-1].amount;
}

string genAnswer(Item item, int len)
{
	string a(len, 'B');
	a[0] = item.first,a[len-1] = item.last;
	for (int i = 1, r = item.amount; i < len - 2; i += 2)
	{
		a[i] = 'A';
		a[i+1] = 'C';
		--r;
		if (r == 0)
			break;
	}
	return a;
}

static const string abc = "ABC";
int len = abc.size();

int main(int argc, char* argv[])
{
	cin >> k >> x >> n >> m;

	FOR(l1,0,len)
		FOR(l2,0,len)
			FOR(c1,0,n/2)
			{
				Item t(abc[l1], abc[l2], c1);
				start.PB(t);
			}
	//cout << "Generated " << L(start) << " items " << endl;
	int ln = start.size();
	FOR(i,0,ln)
		FOR(j,i,ln)
		if (getNumber(start[i], start[j]) == x)
		{
			cout << genAnswer(start[i], n) << endl;
			cout << genAnswer(start[j], m) << endl;
			return 0;
		}
	cout << "Happy new year!" << endl;
	return 0;
}


// CF.cpp : Defines the entry point for the console application.
//
#include <vector>
#include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>

#define PB push_back
#define MP make_pair
#define L(o) (size_t)(o.size())
#define FOR(i,a,b) for(int i = (a); (i) < (b); ++(i))

using namespace std;

class Item
{
public:
	char first, last;
	int amount;
	Item(char f, char l, int a): first(f), last(l), amount(a)
	{ }
};

vector<Item> start;

int k, x, n, m;

int getNumber(Item one, Item two)
{
	if (n == 2 && one.first == 'A' && one.last == 'C')
		++one.amount;
	if (m == 2 && two.first == 'A' && two.last == 'C')
		++two.amount;
	Item t = one;
	//cout << t.first << " " << t.last << " " << t.amount << endl;
	t = two;
	//cout << t.first << " " << t.last << " " << t.amount << endl;

	vector<Item> b;
	b.PB(one);
	b.PB(two);
	FOR(i,2,k)
		b.PB(Item(b[i-2].first, b[i-1].last, b[i-2].amount + b[i-1].amount + (int)(b[i-2].last=='A' && b[i-1].first == 'C')));
	//cout << "Can get " << b[k-1].amount << endl;
	return b[k-1].amount;
}

string genAnswer(Item item, int len)
{
	string a(len, 'B');
	a[0] = item.first,a[len-1] = item.last;
	for (int i = 1, r = item.amount; i < len - 2; i += 2)
	{
		a[i] = 'A';
		a[i+1] = 'C';
		--r;
		if (r == 0)
			break;
	}
	return a;
}

static const string abc = "ABC";
int len = abc.size();

int main(int argc, char* argv[])
{
	cin >> k >> x >> n >> m;

	FOR(l1,0,len)
		FOR(l2,0,len)
			FOR(c1,0,n/2)
			{
				Item t(abc[l1], abc[l2], c1);
				start.PB(t);
			}
	//cout << "Generated " << L(start) << " items " << endl;
	int ln = start.size();
	FOR(i,0,ln)
		FOR(j,i,ln)
		if (getNumber(start[i], start[j]) == x)
		{
			cout << genAnswer(start[i], n) << endl;
			cout << genAnswer(start[j], m) << endl;
			return 0;
		}
	cout << "Happy new year!" << endl;
	return 0;
}


// CF.cpp : Defines the entry point for the console application.
//
#include <vector>
#include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>

#define PB push_back
#define MP make_pair
#define L(o) (size_t)(o.size())
#define FOR(i,a,b) for(int i = (a); (i) < (b); ++(i))

using namespace std;

class Item
{
public:
	char first, last;
	long long amount;
	Item(char f, char l, long long a): first(f), last(l), amount(a)
	{ }
};

vector<Item> start;

int k, x, n, m;

int getNumber(Item one, Item two)
{
	if (n == 1)
		one.last = one.first;
	if (m == 1)
		two.last = two.first;
	if (n == 2 && one.first == 'A' && one.last == 'C')
		++one.amount;
	if (m == 2 && two.first == 'A' && two.last == 'C')
		++two.amount;
	Item t = one;
	//cout << t.first << " " << t.last << " " << t.amount << endl;
	t = two;
	//cout << t.first << " " << t.last << " " << t.amount << endl;

	vector<Item> b;
	b.reserve(k);
	b.PB(one);
	b.PB(two);
	FOR(i,2,k)
	{
		b.PB(Item(b[i-2].first, b[i-1].last, b[i-2].amount + b[i-1].amount + (long long)(b[i-2].last=='A' && b[i-1].first == 'C')));
		if (b[i].amount > x)
			return -1;
	}
	//cout << "Can get " << b[k-1].amount << endl;
	return b[k-1].amount;
}

string genAnswer(Item item, int len, bool &can)
{
	string a(len, 'B');
	a[len-1] = item.last,a[0] = item.first;
	int r = item.amount;
	for (int i = (item.first == 'A') ? 0 : 1;
		i < len - (item.last == 'C' ? 1 : 2) && r > 0;
		i += 2, --r)
	{
		a[i] = 'A';
		a[i+1] = 'C';
	}
	if (r > 0)
		can = false;
	return a;
}

static const string abc = "ABC";
int len = abc.size();

int main(int argc, char* argv[])
{
	cin >> k >> x >> n >> m;

	FOR(l1,0,len)
		FOR(l2,0,len)
			FOR(c1,0,max((n + 1)/2,1))
			{
				Item t(abc[l1], abc[l2], c1);
				start.PB(t);
			}
	//cout << "Generated " << L(start) << " items " << endl;
	int ln = start.size();
	int fail = 0;
	FOR(i,0,ln)
		FOR(j,i,ln)
		if (getNumber(start[i], start[j]) == x)
		{
			++fail;
			bool can(1);
			string ans1(genAnswer(start[i], n, can));
			string ans2(genAnswer(start[j], m, can));
			if (!can)
				continue;
			cout << ans1 << endl;
			cout << ans2 << endl;
		//	cout << fail << endl;
			return 0;
		}
	cout << "Happy new year!" << endl;
	//		cout << fail << endl;
	return 0;
}


// CF.cpp : Defines the entry point for the console application.
//
#include <vector>
#include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>

#define PB push_back
#define MP make_pair
#define L(o) (size_t)(o.size())
#define FOR(i,a,b) for(int i = (a); (i) < (b); ++(i))

using namespace std;

class Item
{
public:
	char first, last;
	int amount;
	Item(char f, char l, int a): first(f), last(l), amount(a)
	{ }
};

vector<Item> start;

int k, x, n, m;

int getNumber(Item one, Item two)
{
	if (n == 1)
		one.last = one.first;
	if (m == 1)
		two.last = two.first;
	if (n == 2 && one.first == 'A' && one.last == 'C')
		++one.amount;
	if (m == 2 && two.first == 'A' && two.last == 'C')
		++two.amount;
	Item t = one;
	//cout << t.first << " " << t.last << " " << t.amount << endl;
	t = two;
	//cout << t.first << " " << t.last << " " << t.amount << endl;

	vector<Item> b;
	b.PB(one);
	b.PB(two);
	FOR(i,2,k)
		b.PB(Item(b[i-2].first, b[i-1].last, b[i-2].amount + b[i-1].amount + (int)(b[i-2].last=='A' && b[i-1].first == 'C')));
	//cout << "Can get " << b[k-1].amount << endl;
	return b[k-1].amount;
}

string genAnswer(Item item, int len, bool &can)
{
	string a(len, 'B');
	a[0] = item.first,a[len-1] = item.last;
	int r = item.amount;
	for (int i = (item.first == 'A') ? 0 : 1;
		i < len - (item.last == 'C' ? 1 : 2) && r > 0;
		i += 2, --r)
	{
		a[i] = 'A';
		a[i+1] = 'C';
	}
	if (r > 0)
		can = false;
	return a;
}

static const string abc = "ABC";
int len = abc.size();

int main(int argc, char* argv[])
{
	cin >> k >> x >> n >> m;

	FOR(l1,0,len)
		FOR(l2,0,len)
			FOR(c1,0,max(n/2,1))
			{
				Item t(abc[l1], abc[l2], c1);
				start.PB(t);
			}
	//cout << "Generated " << L(start) << " items " << endl;
	int ln = start.size();
	FOR(i,0,ln)
		FOR(j,i,ln)
		if (getNumber(start[i], start[j]) == x)
		{
			bool can(1);
			string ans1(genAnswer(start[i], n, can));
			string ans2(genAnswer(start[j], m, can));
			if (!can)
				continue;
			cout << ans1 << endl;
			cout << ans2 << endl;
			return 0;
		}
	cout << "Happy new year!" << endl;
	return 0;
}


// CF.cpp : Defines the entry point for the console application.
//
#include <vector>
#include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>

#define PB push_back
#define MP make_pair
#define L(o) (size_t)(o.size())
#define FOR(i,a,b) for(int i = (a); (i) < (b); ++(i))

using namespace std;

class Item
{
public:
	char first, last;
	long long amount;
	Item(char f, char l, long long a): first(f), last(l), amount(a)
	{ }
};

vector<Item> start1, start2;

int k, x, n, m;

int getNumber(Item one, Item two)
{
	if (n == 1)
		one.last = one.first;
	if (m == 1)
		two.last = two.first;
	if (n == 2 && one.first == 'A' && one.last == 'C')
		++one.amount;
	if (m == 2 && two.first == 'A' && two.last == 'C')
		++two.amount;
	Item t = one;
	//cout << t.first << " " << t.last << " " << t.amount << endl;
	t = two;
	//cout << t.first << " " << t.last << " " << t.amount << endl;

	vector<Item> b;
	b.reserve(k);
	b.PB(one);
	b.PB(two);
	FOR(i,2,k)
	{
		b.PB(Item(b[i-2].first, b[i-1].last, b[i-2].amount + b[i-1].amount + (long long)(b[i-2].last=='A' && b[i-1].first == 'C')));
		if (b[i].amount > x)
			return -1;
	}
	//cout << "Can get " << b[k-1].amount << endl;
	return b[k-1].amount;
}

string genAnswer(Item item, int len, bool &can)
{
	string a(len, 'B');
	a[len-1] = item.last,a[0] = item.first;
	int r = item.amount;
	for (int i = (item.first == 'A') ? 0 : 1;
		i < len - (item.last == 'C' ? 1 : 2) && r > 0;
		i += 2, --r)
	{
		a[i] = 'A';
		a[i+1] = 'C';
	}
	if (r > 0)
		can = false;
	return a;
}

static const string abc = "ABC";
int len = abc.size();

int main(int argc, char* argv[])
{
	cin >> k >> x >> n >> m;

	FOR(l1,0,len)
		FOR(l2,0,len)
			FOR(c1,0,max(max((n + 1)/2, (m + 1)/2),1))
			{
				Item t(abc[l1], abc[l2], c1);
				if (c1 * 2 <= n)
					start1.PB(t);
				if (c1 * 2 <= m)
					start2.PB(t);
			}
	//cout << "Generated " << L(start) << " items " << endl;
	int ln1 = L(start1), ln2 = L(start2);
	int fail = 0;
	FOR(i,0,ln1)
		FOR(j,0,ln2)
		if (getNumber(start1[i], start2[j]) == x)
		{
			++fail;
			bool can(1);
			string ans1(genAnswer(start1[i], n, can));
			string ans2(genAnswer(start2[j], m, can));
			if (!can)
				continue;
			cout << ans1 << endl;
			cout << ans2 << endl;
		//	cout << fail << endl;
			return 0;
		}
	cout << "Happy new year!" << endl;
	//		cout << fail << endl;
	return 0;
}


// CF.cpp : Defines the entry point for the console application.
//
#include <vector>
#include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>

#define PB push_back
#define MP make_pair
#define L(o) (size_t)(o.size())
#define FOR(i,a,b) for(int i = (a); (i) < (b); ++(i))

using namespace std;

class Item
{
public:
	char first, last;
	int amount;
	Item(char f, char l, int a): first(f), last(l), amount(a)
	{ }
};

vector<Item> start;

int k, x, n, m;

int getNumber(Item one, Item two)
{
	if (n == 1)
		one.last = one.first;
	if (m == 1)
		two.last = two.first;
	if (n == 2 && one.first == 'A' && one.last == 'C')
		++one.amount;
	if (m == 2 && two.first == 'A' && two.last == 'C')
		++two.amount;
	Item t = one;
	//cout << t.first << " " << t.last << " " << t.amount << endl;
	t = two;
	//cout << t.first << " " << t.last << " " << t.amount << endl;

	vector<Item> b;
	b.PB(one);
	b.PB(two);
	FOR(i,2,k)
		b.PB(Item(b[i-2].first, b[i-1].last, b[i-2].amount + b[i-1].amount + (int)(b[i-2].last=='A' && b[i-1].first == 'C')));
	//cout << "Can get " << b[k-1].amount << endl;
	return b[k-1].amount;
}

string genAnswer(Item item, int len, bool &can)
{
	string a(len, 'B');
	a[len-1] = item.last,a[0] = item.first;
	int r = item.amount;
	for (int i = (item.first == 'A') ? 0 : 1;
		i < len - (item.last == 'C' ? 1 : 2) && r > 0;
		i += 2, --r)
	{
		a[i] = 'A';
		a[i+1] = 'C';
	}
	if (r > 0)
		can = false;
	return a;
}

static const string abc = "ABC";
int len = abc.size();

int main(int argc, char* argv[])
{
	cin >> k >> x >> n >> m;

	FOR(l1,0,len)
		FOR(l2,0,len)
			FOR(c1,0,max(n/2,1))
			{
				Item t(abc[l1], abc[l2], c1);
				start.PB(t);
			}
	//cout << "Generated " << L(start) << " items " << endl;
	int ln = start.size();
	FOR(i,0,ln)
		FOR(j,i,ln)
		if (getNumber(start[i], start[j]) == x)
		{
			bool can(1);
			string ans1(genAnswer(start[i], n, can));
			string ans2(genAnswer(start[j], m, can));
			if (!can)
				continue;
			cout << ans1 << endl;
			cout << ans2 << endl;
			return 0;
		}
	cout << "Happy new year!" << endl;
	return 0;
}


// CF.cpp : Defines the entry point for the console application.
//
#include <vector>
#include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>

#define PB push_back
#define MP make_pair
#define L(o) (size_t)(o.size())
#define FOR(i,a,b) for(int i = (a); (i) < (b); ++(i))

using namespace std;

class Item
{
public:
	char first, last;
	int amount;
	Item(char f, char l, int a): first(f), last(l), amount(a)
	{ }
};

vector<Item> start;

int k, x, n, m;

int getNumber(Item one, Item two)
{
	if (n == 1)
		one.last = one.first;
	if (m == 1)
		two.last = two.first;
	if (n == 2 && one.first == 'A' && one.last == 'C')
		++one.amount;
	if (m == 2 && two.first == 'A' && two.last == 'C')
		++two.amount;
	Item t = one;
	//cout << t.first << " " << t.last << " " << t.amount << endl;
	t = two;
	//cout << t.first << " " << t.last << " " << t.amount << endl;

	vector<Item> b;
	b.PB(one);
	b.PB(two);
	FOR(i,2,k)
		b.PB(Item(b[i-2].first, b[i-1].last, b[i-2].amount + b[i-1].amount + (int)(b[i-2].last=='A' && b[i-1].first == 'C')));
	//cout << "Can get " << b[k-1].amount << endl;
	return b[k-1].amount;
}

string genAnswer(Item item, int len)
{
	string a(len, 'B');
	a[0] = item.first,a[len-1] = item.last;
	for (int i = 1, r = item.amount; i < len - 2 && r > 0; i += 2, --r)
	{
		a[i] = 'A';
		a[i+1] = 'C';
	}
	return a;
}

static const string abc = "ABC";
int len = abc.size();

int main(int argc, char* argv[])
{
	cin >> k >> x >> n >> m;

	FOR(l1,0,len)
		FOR(l2,0,len)
			FOR(c1,0,max(n/2,1))
			{
				Item t(abc[l1], abc[l2], c1);
				start.PB(t);
			}
	//cout << "Generated " << L(start) << " items " << endl;
	int ln = start.size();
	FOR(i,0,ln)
		FOR(j,i,ln)
		if (getNumber(start[i], start[j]) == x)
		{
			cout << genAnswer(start[i], n) << endl;
			cout << genAnswer(start[j], m) << endl;
			return 0;
		}
	cout << "Happy new year!" << endl;
	return 0;
}


// CF.cpp : Defines the entry point for the console application.
//
#include <vector>
#include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>

#define PB push_back
#define MP make_pair
#define L(o) (size_t)(o.size())
#define FOR(i,a,b) for(int i = (a); (i) < (b); ++(i))

using namespace std;

class Item
{
public:
	char first, last;
	int amount;
	Item(char f, char l, int a): first(f), last(l), amount(a)
	{ }
};

vector<Item> start;

int k, x, n, m;

int getNumber(Item one, Item two)
{
	if (n == 1)
		one.last = one.first;
	if (m == 1)
		two.last = two.first;
	if (n == 2 && one.first == 'A' && one.last == 'C')
		++one.amount;
	if (m == 2 && two.first == 'A' && two.last == 'C')
		++two.amount;
	Item t = one;
	//cout << t.first << " " << t.last << " " << t.amount << endl;
	t = two;
	//cout << t.first << " " << t.last << " " << t.amount << endl;

	vector<Item> b;
	b.PB(one);
	b.PB(two);
	FOR(i,2,k)
		b.PB(Item(b[i-2].first, b[i-1].last, b[i-2].amount + b[i-1].amount + (int)(b[i-2].last=='A' && b[i-1].first == 'C')));
	//cout << "Can get " << b[k-1].amount << endl;
	return b[k-1].amount;
}

string genAnswer(Item item, int len, bool &can)
{
	string a(len, 'B');
	a[len-1] = item.last,a[0] = item.first;
	int r = item.amount;
	for (int i = (item.first == 'A') ? 0 : 1;
		i < len - (item.last == 'C' ? 1 : 2) && r > 0;
		i += 2, --r)
	{
		a[i] = 'A';
		a[i+1] = 'C';
	}
	if (r > 0)
		can = false;
	return a;
}

static const string abc = "ABC";
int len = abc.size();

int main(int argc, char* argv[])
{
	cin >> k >> x >> n >> m;

	FOR(l1,0,len)
		FOR(l2,0,len)
			FOR(c1,0,max((n + 1)/2,1))
			{
				Item t(abc[l1], abc[l2], c1);
				start.PB(t);
			}
	//cout << "Generated " << L(start) << " items " << endl;
	int ln = start.size();
	FOR(i,0,ln)
		FOR(j,i,ln)
		if (getNumber(start[i], start[j]) == x)
		{
			bool can(1);
			string ans1(genAnswer(start[i], n, can));
			string ans2(genAnswer(start[j], m, can));
			if (!can)
				continue;
			cout << ans1 << endl;
			cout << ans2 << endl;
			return 0;
		}
	cout << "Happy new year!" << endl;
	return 0;
}


# include <iostream>
# include <cstdio>
using namespace std;

int n, m, k, x;

bool ok(bool a1, bool c1, int s1, bool a2, bool c2, int s2){
	for (int w = 3; w <= k; w ++){
		int s = s1 + s2 + (a1 && c2);
		if (s > x) return false;
		int ta = a2;
		int tc = c1;
		a1 = a2;
		c1 = c2;
		a2 = ta;
		c2 = tc;
		s1 = s2;
		s2 = s;
	}
	return s2 == x;
}
void print(bool a, bool c, int s, int sz){
	if (c) putchar('C');
	for (int i = 0; i < s; i ++) printf("AC");
	int t = a + c + s + s;
	while (++t <= sz) putchar('C');
	if (a) putchar('A');
	puts("");
}

int main(){
#ifdef _DEBUG
	freopen("in", "r", stdin); freopen("out", "w", stdout);
#endif
	scanf("%d%d%d%d", &k, &x, &n, &m);
	for (int a1 = 0; a1 <= 1; a1 ++)
		for (int c1 = 0; c1 <= 1; c1 ++)
			for (int i = 0; 2 * i + a1 + c1 <= n; i ++)
				for (int a2 = 0; a2 <= 1; a2 ++)
					for (int c2 = 0; c2 <= 1; c2 ++)
						for (int j = 0; 2 * j + a2 + c2 <= m; j ++){
							if (ok(a1, c1, i, a2, c2, j)){
								print(a1, c1, i, n);
								print(a2, c2, j, m);
								return 0;
							}
						}
	puts("Happy new year!");

	return 0;
}


# include <iostream>
# include <cstdio>
using namespace std;

int n, m, k, x;

bool ok(bool a1, bool c1, int s1, bool a2, bool c2, int s2){
	for (int w = 3; w <= k; w ++){
		int s = s1 + s2 + (a1 && c2);
		if (s > x) return false;
		int ta = a2;
		int tc = c1;
		a1 = a2;
		c1 = c2;
		a2 = ta;
		c2 = tc;
		s1 = s2;
		s2 = s;
	}
	return s2 == x;
}
void print(bool a, bool c, int s, int sz){
	if (c) putchar('C');
	for (int i = 0; i < s; i ++) printf("AC");
	int t = a + c + s + s;
	while (++t <= sz) putchar('Z');
	if (a) putchar('A');
	puts("");
}

int main(){
#ifdef _DEBUG
	freopen("in", "r", stdin); freopen("out", "w", stdout);
#endif
	scanf("%d%d%d%d", &k, &x, &n, &m);
	for (int a1 = 0; a1 <= 1; a1 ++)
		for (int c1 = 0; c1 <= 1; c1 ++)
			for (int i = 0; 2 * i + a1 + c1 <= n; i ++)
				for (int a2 = 0; a2 <= 1; a2 ++)
					for (int c2 = 0; c2 <= 1; c2 ++)
						for (int j = 0; 2 * j + a2 + c2 <= m; j ++){
							if (ok(a1, c1, i, a2, c2, j)){
								print(a1, c1, i, n);
								print(a2, c2, j, m);
								return 0;
							}
						}
	puts("Happy new year!");

	return 0;
}


#include<stdio.h>
#include<string.h>
#include<algorithm>
#define ll __int64
using namespace std ;

const int maxn = 311111 ;

void print ( int x1 , int n , int a1 , int an ) {
    int i , j , k , l , flag = 0 ;
    if ( a1 == 0 ) printf ( "A" ) ;
    else if ( a1 == 2 ) printf ( "C" ) ;
    else printf ( "X" ) ;
    for ( i = 2 ; i <= n ; i ++ ) {
    //    printf ( "i = %d\n" , i ) ;
        if ( i == n ) {
            if ( an == 0 ) printf ( "A" ) ;
            else if ( an == 2 ) printf ( "C" ) ;
            else printf ( "X" ) ;
        }
        else if ( i == 2 ) {
            if ( a1 == 0 ) {
                if ( x1 ) {
                    printf ( "C" ) ;
                    x1 -- ;
                    flag = 0 ;
                }
                else printf ( "X" ) ;
            }
            else {
                if ( x1 ) {
                    printf ( "A" ) ;
                    flag = 1 ;
                }
                else printf ( "X" ) ;
            }
        }
        else if ( flag ) {
            printf ( "C" ) ;
            x1 -- ;
            flag = 0 ;
        }
        else if ( x1 ) {
            printf ( "A" ) ;
            flag = 1 ;
        }
        else printf ( "X" ) ;
    }
}

int main () {
    int n , m , i , j , k , x , t ;
    ll l ;
    int a1 , an , b1 , bn ;
    scanf ( "%d%d%d%d" , &k , &x , &n , &m ) ;
    int v1 = n / 2 , v2 = m / 2 , flag = 0 ;
    for ( i = 0 ; i <= v1 ; i ++ ) {
        for ( j = 0 ; j <= v2 ; j ++ ) {
            for ( a1 = 0 ; a1 < 3 ; a1 ++ ) {
                for ( an = 0 ; an < 3 ; an ++ ) {
                    if ( i == v1 && (n%2==0) && an != 2 )
                        continue ;
                    if ( n == 1 && a1 != an ) continue ;
                    if ( n == 2 && a1 == 0 && an == 2 && i == 0 ) continue ;
                    if ( n == 2 && i == 1 && (a1!=0||an!=2) ) continue ;
                    int v ;
                    if ( n >= 2 ) {
                        if ( n % 2 ) {
                            if ( a1 == 0 || an == 2 )
                                v = (n-1) / 2 ;
                            else v = (n-2) / 2 ;
                        }
                        else {
                            if ( a1 == 0 && an == 2 )
                                v = n / 2 ;
                            else if ( a1 == 0 || an == 2 )
                                v = (n-1) / 2 ;
                            else v = (n-2) / 2 ;
                        }
                        if ( v < i ) continue ;
                    }
                    for ( b1 = 0 ; b1 < 3 ; b1 ++ ) {
                        for ( bn = 0 ; bn < 3 ; bn ++ ) {
                            if ( j == v2 && (m%2==0) && bn != 2 )
                                continue ;
                            if ( m == 1 && b1 != bn ) continue ;
                            if ( m == 2 && b1 == 0 && bn == 2 && j == 0 ) continue ;
                            if ( m == 2 && j == 1 && (b1!=0||bn!=2) ) continue ;
                            if ( m >= 2 ) {
                                if ( m % 2 ) {
                                    if ( b1 == 0 || bn == 2 )
                                        v = (m-1) / 2 ;
                                    else v = (m-2) / 2 ;
                                }
                                else {
                                    if ( b1 == 0 && bn == 2 )
                                        v = m / 2 ;
                                    else if ( b1 == 0 || bn == 2 )
                                        v = (m-1) / 2 ;
                                    else v = (m-2) / 2 ;
                                }
                                if ( v < j ) continue ;
                            }
                            ll t1 = i , t2 = j ;
                            l = t2 ;
                            t2 = t1 + t2 + ((an==0)&&(b1==2)) ;
                            t1 = l ;
                            for ( t = 4 ; t <= k ; t ++ ) {
                                l = t2 ;
                                if ( t % 2 )
                                    t2 = t1 + t2 + ((bn==0)&&(b1==2)) ;
                                else
                                    t2 = t1 + t2 + ((bn==0)&&(a1==2)) ;
                                t1 = l ;
                            }
                        //    printf ( "t2 = %d , x = %d\n" , t2 , x ) ;
                            if ( t2 == (ll)x ) {
                        //        printf ( "i = %d , j = %d , a1 = %d , an = %d , b1 = %d , bn = %d\n" , i,j,a1,an,b1,bn ) ;
                                flag = 1 ;
                                print ( i , n , a1 , an ) ;
                                puts ( "" ) ;
                     //           puts ( "fuck" ) ;
                                print ( j , m , b1 , bn ) ;
                                break ;
                            }
                        }
                        if ( flag ) break ;
                    }
                    if ( flag ) break ;
                }
                if ( flag ) break ;
            }
            if ( flag ) break ;
        }
        if ( flag ) break ;
    }
    if ( !flag ) puts ( "Happy new year!" ) ;
    return 0 ;
}


#include <iostream>

using namespace std;

int k, x,n,m,nn,mm;

bool check (int b, int e, int nn, int nh)
{
	if (b!=e && nh==1) return false;
	if (2*nn>nh) return false;
	if (nh==1 && nn>0) return false;
	if (nh==2 && b==1 && e==2 && nn==0) return false;
	if (nh==2 && nn>0)
	{
		if (b==1 && e==2 && nn==1) return true;
		return false;
	}
	if (nh==3 && nn>1) return false;
	if (nh==3 && nn==1)
	{
		if (b==3 && e==3) return false;
		if (b==2 && e==1) return false;
		if (b==3 && e==1) return false;
		if (b==2 && e==3) return false;
		return true;
	}
	if (nh==3 && nn==0) return true;
	if (nh>3)
	{
		if (b==1) {nn--;nh--; nh--;}
		if (e==2) {nn--; nh--;nh--;}
		if (nn<=0) return true;
		if (2*nn>nh) return false;
	}
	return true;
}

bool count1 (int i1b, int i1e,int i2b, int i2e, int n1, int n2)
{
	int ni1b, ni1e, ni2b,ni2e, nn1,nn2;
	long long kk=0;
	if (!check (i1b, i1e,n1,n)) return false;
	if (!check (i2b,i2e, n2,m)) return false;

	for (int i= 3; i<=k; i++)
	{
		kk= n1+n2;
		if (i1e ==1 && i2b ==2) kk++;
		ni2b = i1b; ni2e = i2e;
		ni1b= i2b; ni1e = i2e;
		nn1 = n2; nn2 = kk;
		i1b = ni1b; i1e = ni1e; i2b = ni2b; i2e = ni2e; n1= nn1; n2 = nn2;
	}
	if (kk==x) return true;
		else return false;
}

void print (int b, int e, int nn, int nh)
{
	//int nh = n;
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	if (b==1) cout << "A"; if (b==2) cout << "C"; if (b==3) cout << "X";
	nh--;
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	if (nn>=1 && b==1) {cout << "C"; nn--; nh--;}
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	while (true)
	{
		if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
		if (nh==2 && nn==1) {cout << "AC"; return;}
		if (nn==1 && e==2) break;
		if (nn>=1) {cout << "AC"; nh--; nh--; nn--;}
		if (nn==0) break;
		//if (nn==1 && e==2) break;
	}
	while (true)
	{
	   if (nh==2 && nn==1) {cout << "AC"; return;}
	   if (nh==1) break;
	   cout << "X"; nh--;
	}
	if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X";

}
int main()
{
	//freopen ("input.txt", "r", stdin);

	cin >> k>> x>> n>>m;
	for (int i =0; i<=n/2; i++)
		for (int j=0; j<=m/2; j++)
		{
			bool flag = false;
			for (int ii = 1; ii<=3; ii++)
				for (int iii = 1; iii<=3; iii++)
					for (int jjj =1; jjj<=3; jjj++)
						for (int jj =1; jj<=3; jj++)
				{
					flag = count1 (ii,iii,jj,jjj,i,j);
					if (flag)
					{ print (ii,iii,i, n); cout << endl; print (jj,jjj,j,m); cout << endl; return 0;}
						}
		}
	cout << "Happy new year!";
	return 0;

}


#include <iostream>

using namespace std;

int k, x,n,m,nn,mm;

bool check (int b, int e, int nn, int nh)
{
	if (b!=e && nh==1) return false;
	if (2*nn>nh) return false;
	if (nh==1 && nn>0) return false;
	if (nh==2 && b==1 && e==2 && nn==0) return false;
	if (nh==2 && nn>0)
	{
		if (b==1 && e==2 && nn==1) return true;
		return false;
	}
	if (nh==3 && nn>1) return false;
	if (nh==3 && nn==1)
	{
		if (b==3 && e==3) return false;
		if (b==2 && e==1) return false;
		if (b==3 && e==1) return false;
		if (b==2 && e==3) return false;
		return true;
	}
	if (nh==3 && nn==0) return true;
	if (nh>3)
	{
		if (b==1) {nn--;nh--; nh--;}
		if (e==2) {nn--; nh--;nh--;}
		if (nn<=0) return true;
		if (2*nn>nh) return false;
	}
	return true;
}

bool count1 (int i1b, int i1e,int i2b, int i2e, int n1, int n2)
{
	int ni1b, ni1e, ni2b,ni2e, nn1,nn2;
	long long kk=0;
	if (!check (i1b, i1e,n1,n)) return false;
	if (!check (i2b,i2e, n2,m)) return false;

	for (int i= 3; i<=k; i++)
	{
		kk= n1+n2;
		if (i1e ==1 && i2b ==2) kk++;
		ni2b = i1b; ni2e = i2e;
		ni1b= i2b; ni1e = i2e;
		nn1 = n2; nn2 = kk;
		i1b = ni1b; i1e = ni1e; i2b = ni2b; i2e = ni2e; n1= nn1; n2 = nn2;
	}
	if (kk==x) return true;
		else return false;
}

void print (int b, int e, int nn)
{
	int nh = n;
	if (b==1) cout << "A"; if (b==2) cout << "C"; if (b==3) cout << "C";
	nh--;
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "C"; return;}
	if (nn>1 && b==1) {cout << "C"; nn--; nh--;}
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "C"; return;}
	while (true)
	{
		if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "C"; return;}
		if (nh==2 && nn==1) {cout << "AC"; return;}
		if (nn==1 && e==2) break;
		if (nn>=1) {cout << "AC"; nh--; nh--; nn--;}
		if (nn==0) break;
		//if (nn==1 && e==2) break;
	}
	while (true)
	{
	   if (nh==2 && nn==1) {cout << "AC"; return;}
	   if (nh==1) break;
	   cout << "X"; nh--;
	}
	if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "C";

}
int main()
{
	//freopen ("input.txt", "r", stdin);

	cin >> k>> x>> n>>m;
	for (int i =0; i<=n/2; i++)
		for (int j=0; j<=m/2; j++)
		{
			bool flag = false;
			for (int ii = 1; ii<=3; ii++)
				for (int iii = 1; iii<=3; iii++)
					for (int jjj =1; jjj<=3; jjj++)
						for (int jj =1; jj<=3; jj++)
				{
					flag = count1 (ii,iii,jj,jjj,i,j);
					if (flag) { print (ii,iii,i); cout << endl; print (jj,jjj,j); cout << endl; return 0;}
				}
		}
	cout << "Happy new year!";
	return 0;

}


#include <iostream>

using namespace std;

int k, x,n,m,nn,mm;

bool check (int b, int e, int nn, int nh)
{
	if (2*nn>nh) return false;
	if (nh==1 && nn>0) return false;
	if (nh==2 && b==1 && e==2 && nn==0) return false;
	if (nh==2 && nn>0)
	{
		if (b==1 && e==2 && nn==1) return true;
		return false;
	}
	if (nh==3 && nn>1) return false;
	if (nh==3 && nn==1)
	{
		if (b==3 && e==3) return false;
		if (b==2 && e==1) return false;
		if (b==3 && e==1) return false;
		if (b==2 && e==3) return false;
		return true;
	}
	if (nh==3 && nn==0) return true;
	if (nh>3)
	{
		if (b==1) {nn--;nh--; nh--;}
		if (e==2) {nn--; nh--;nh--;}
		if (nn<=0) return true;
		if (2*nn>nh) return false;
	}
	return true;
}

bool count1 (int i1b, int i1e,int i2b, int i2e, int n1, int n2)
{
	int ni1b, ni1e, ni2b,ni2e, nn1,nn2;
	long long kk=0;
	if (!check (i1b, i1e,n1,n)) return false;
	if (!check (i2b,i2e, n2,m)) return false;

	for (int i= 3; i<=k; i++)
	{
		kk= n1+n2;
		if (i1e ==1 && i2b ==2) kk++;
		ni2b = i1b; ni2e = i2e;
		ni1b= i2b; ni1e = i2e;
		nn1 = n2; nn2 = kk;
		i1b = ni1b; i1e = ni1e; i2b = ni2b; i2e = ni2e; n1= nn1; n2 = nn2;
	}
	if (kk==x) return true;
		else return false;
}

void print (int b, int e, int nn)
{
	int nh = n;
	if (b==1) cout << "A"; if (b==2) cout << "C"; if (b==3) cout << "C";
	nh--;
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "C"; return;}
	if (nn>1 && b==1) {cout << "C"; nn--; nh--;}
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "C"; return;}
	while (true)
	{
		if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "C"; return;}
		if (nh==2 && nn==1) {cout << "AC"; return;}
		if (nn==1 && e==2) break;
		if (nn>=1) {cout << "AC"; nh--; nh--; nn--;}
		if (nn==0) break;
		//if (nn==1 && e==2) break;
	}
	while (true)
	{
	   if (nh==2 && nn==1) {cout << "AC"; return;}
	   if (nh==1) break;
	   cout << "X"; nh--;
	}
	if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "C";

}
int main()
{
	//freopen ("input.txt", "r", stdin);

	cin >> k>> x>> n>>m;
	for (int i =0; i<=n/2; i++)
		for (int j=0; j<=m/2; j++)
		{
			bool flag = false;
			for (int ii = 1; ii<=3; ii++)
				for (int iii = 1; iii<=3; iii++)
					for (int jjj =1; jjj<=3; jjj++)
						for (int jj =1; jj<=3; jj++)
				{
					flag = count1 (ii,iii,jj,jjj,i,j);
					if (flag) { print (ii,iii,i); cout << endl; print (jj,jjj,j); cout << endl; return 0;}
				}
		}
	cout << "Happy New Year!";
	return 0;

}


#include <iostream>

using namespace std;

int k,n,m,nn,mm;
long long x;
bool check (int b, int e, int nn, int nh)
{
	if (b!=e && nh==1) return false;
	if (2*nn>nh) return false;
	if (nh==1 && nn>0) return false;
	if (nh==2 && b==1 && e==2 && nn==0) return false;
	if (nh==2 && nn>0)
	{
		if (b==1 && e==2 && nn==1) return true;
		return false;
	}
	if (nh==3 && nn>1) return false;
	if (nh==3 && nn==1)
	{
		if (b==3 && e==3) return false;
		if (b==2 && e==1) return false;
		if (b==3 && e==1) return false;
		if (b==2 && e==3) return false;
		return true;
	}
	if (nh==3 && nn==0) return true;
	if (nh>3)
	{
		if (b==1) {nn--;nh--; nh--;} else nh--;
		if (e==2) {nn--; nh--;nh--;} else nh--;
		if (nn<=0) return true;
		if (2*nn>nh) return false;
	}
	return true;
}

bool count1 (int i1b, int i1e,int i2b, int i2e, long long n1, long long n2)
{
	int ni1b, ni1e, ni2b,ni2e;
	long long nn1,nn2;
	long long kk=0;
	if (!check (i1b, i1e,n1,n)) return false;
	if (!check (i2b,i2e, n2,m)) return false;

	for (int i= 3; i<=k; i++)
	{
		kk= n1+n2;
		if (i1e ==1 && i2b ==2) kk++;
		ni2b = i1b; ni2e = i2e;
		ni1b= i2b; ni1e = i2e;
		nn1 = n2; nn2 = kk;
		i1b = ni1b; i1e = ni1e; i2b = ni2b; i2e = ni2e; n1= nn1; n2 = nn2;
		if (kk>x) return false;
	}
	if (kk==x) {  return true;  }
		else return false;
}

void print (int b, int e, int nn, int nh)
{
	//int nh = n;
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	if (b==1) cout << "A"; if (b==2) cout << "C"; if (b==3) cout << "X";
	nh--;
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	if (nn>=1 && b==1) {cout << "C"; nn--; nh--;}
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	while (true)
	{
		if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
		if (nh==2 && nn==1) {cout << "AC"; return;}
		if (nn==1 && e==2) break;
		if (nn>=1) {cout << "AC"; nh--; nh--; nn--;}
		if (nn==0) break;
		//if (nn==1 && e==2) break;
	}
	while (true)
	{
	   if (nh==2 && nn==1) {cout << "AC"; return;}
	   if (nh==1) break;
	   cout << "X"; nh--;
	}
	if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X";

}
int main()
{
	//freopen ("input.txt", "r", stdin);

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

	for (int i =0; i<=n/2; i++)
		for (int j=0; j<=m/2; j++)
		{
			bool flag = false;
			for (int ii = 1; ii<=3; ii++)
				for (int iii = 1; iii<=3; iii++)
					for (int jjj =1; jjj<=3; jjj++)
						for (int jj =1; jj<=3; jj++)
				{
					flag = count1 (ii,iii,jj,jjj,i,j);
					if (flag)
					{ print (ii,iii,i, n); cout << endl; print (jj,jjj,j,m); cout << endl; return 0;}
				}
		}
	cout << "Happy new year!";
	return 0;

}


#include <iostream>

using namespace std;

int k, x,n,m,nn,mm;

bool check (int b, int e, int nn, int nh)
{
	if (2*nn>nh) return false;
	if (nh==1 && nn>0) return false;
	if (nh==2 && b==1 && e==2 && nn==0) return false;
	if (nh==2 && nn>0)
	{
		if (b==1 && e==2 && nn==1) return true;
		return false;
	}
	if (nh==3 && nn>1) return false;
	if (nh==3 && nn==1)
	{
		if (b==3 && e==3) return false;
		if (b==2 && e==1) return false;
		if (b==3 && e==1) return false;
		if (b==2 && e==3) return false;
		return true;
	}
	if (nh==3 && nn==0) return true;
	if (nh>3)
	{
		if (b==1) {nn--;nh--; nh--;}
		if (e==2) {nn--; nh--;nh--;}
		if (nn<=0) return true;
		if (2*nn>nh) return false;
	}
	return true;
}

bool count1 (int i1b, int i1e,int i2b, int i2e, int n1, int n2)
{
	int ni1b, ni1e, ni2b,ni2e, nn1,nn2;
	long long kk=0;
	if (!check (i1b, i1e,n1,n)) return false;
	if (!check (i2b,i2e, n2,m)) return false;

	for (int i= 3; i<=k; i++)
	{
		kk= n1+n2;
		if (i1e ==1 && i2b ==2) kk++;
		ni2b = i1b; ni2e = i2e;
		ni1b= i2b; ni1e = i2e;
		nn1 = n2; nn2 = kk;
		i1b = ni1b; i1e = ni1e; i2b = ni2b; i2e = ni2e; n1= nn1; n2 = nn2;
	}
	if (kk==x) return true;
		else return false;
}

void print (int b, int e, int nn)
{
	int nh = n;
	if (b==1) cout << "A"; if (b==2) cout << "C"; if (b==3) cout << "C";
	nh--;
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "C"; return;}
	if (nn>1 && b==1) {cout << "C"; nn--; nh--;}
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "C"; return;}
	while (true)
	{
		if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "C"; return;}
		if (nh==2 && nn==1) {cout << "AC"; return;}
		if (nn==1 && e==2) break;
		if (nn>=1) {cout << "AC"; nh--; nh--; nn--;}
		if (nn==0) break;
		//if (nn==1 && e==2) break;
	}
	while (true)
	{
	   if (nh==2 && nn==1) {cout << "AC"; return;}
	   if (nh==1) break;
	   cout << "X"; nh--;
	}
	if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "C";

}
int main()
{
	//freopen ("input.txt", "r", stdin);

	cin >> k>> x>> n>>m;
	for (int i =0; i<=n/2; i++)
		for (int j=0; j<=m/2; j++)
		{
			bool flag = false;
			for (int ii = 1; ii<=3; ii++)
				for (int iii = 1; iii<=3; iii++)
					for (int jjj =1; jjj<=3; jjj++)
						for (int jj =1; jj<=3; jj++)
				{
					flag = count1 (ii,iii,jj,jjj,i,j);
					if (flag) { print (ii,iii,i); cout << endl; print (jj,jjj,j); cout << endl; return 0;}
				}
		}
	cout << "Happy new year!";
	return 0;

}


#include <iostream>

using namespace std;

int k, x,n,m,nn,mm;

bool check (int b, int e, int nn, int nh)
{
	if (b!=e && nh==1) return false;
	if (2*nn>nh) return false;
	if (nh==1 && nn>0) return false;
	if (nh==2 && b==1 && e==2 && nn==0) return false;
	if (nh==2 && nn>0)
	{
		if (b==1 && e==2 && nn==1) return true;
		return false;
	}
	if (nh==3 && nn>1) return false;
	if (nh==3 && nn==1)
	{
		if (b==3 && e==3) return false;
		if (b==2 && e==1) return false;
		if (b==3 && e==1) return false;
		if (b==2 && e==3) return false;
		return true;
	}
	if (nh==3 && nn==0) return true;
	if (nh>3)
	{
		if (b==1) {nn--;nh--; nh--;}
		if (e==2) {nn--; nh--;nh--;}
		if (nn<=0) return true;
		if (2*nn>nh) return false;
	}
	return true;
}

bool count1 (int i1b, int i1e,int i2b, int i2e, int n1, int n2)
{
	int ni1b, ni1e, ni2b,ni2e, nn1,nn2;
	long long kk=0;
	if (!check (i1b, i1e,n1,n)) return false;
	if (!check (i2b,i2e, n2,m)) return false;

	for (int i= 3; i<=k; i++)
	{
		kk= n1+n2;
		if (i1e ==1 && i2b ==2) kk++;
		ni2b = i1b; ni2e = i2e;
		ni1b= i2b; ni1e = i2e;
		nn1 = n2; nn2 = kk;
		i1b = ni1b; i1e = ni1e; i2b = ni2b; i2e = ni2e; n1= nn1; n2 = nn2;
	}
	if (kk==x) return true;
		else return false;
}

void print (int b, int e, int nn)
{
	int nh = n;
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "C"; return;}
	if (b==1) cout << "A"; if (b==2) cout << "C"; if (b==3) cout << "C";
	nh--;
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "C"; return;}
	if (nn>1 && b==1) {cout << "C"; nn--; nh--;}
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "C"; return;}
	while (true)
	{
		if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "C"; return;}
		if (nh==2 && nn==1) {cout << "AC"; return;}
		if (nn==1 && e==2) break;
		if (nn>=1) {cout << "AC"; nh--; nh--; nn--;}
		if (nn==0) break;
		//if (nn==1 && e==2) break;
	}
	while (true)
	{
	   if (nh==2 && nn==1) {cout << "AC"; return;}
	   if (nh==1) break;
	   cout << "X"; nh--;
	}
	if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "C";

}
int main()
{
	//freopen ("input.txt", "r", stdin);

	cin >> k>> x>> n>>m;
	for (int i =0; i<=n/2; i++)
		for (int j=0; j<=m/2; j++)
		{
			bool flag = false;
			for (int ii = 1; ii<=3; ii++)
				for (int iii = 1; iii<=3; iii++)
					for (int jjj =1; jjj<=3; jjj++)
						for (int jj =1; jj<=3; jj++)
				{
					flag = count1 (ii,iii,jj,jjj,i,j);
					if (flag) { print (ii,iii,i); cout << endl; print (jj,jjj,j); cout << endl; return 0;}
				}
		}
	cout << "Happy new year!";
	return 0;

}


#include <iostream>

using namespace std;

int k,n,m,nn,mm;
long long x;
bool check (int b, int e, int nn, int nh)
{
	if (b!=e && nh==1) return false;
	if (2*nn>nh) return false;
	if (nh==1 && nn>0) return false;
	if (nh==2 && b==1 && e==2 && nn==0) return false;
	if (nh==2 && nn>0)
	{
		if (b==1 && e==2 && nn==1) return true;
		return false;
	}
	if (nh==3 && nn>1) return false;
	if (nh==3 && nn==1)
	{
		if (b==3 && e==3) return false;
		if (b==2 && e==1) return false;
		if (b==3 && e==1) return false;
		if (b==2 && e==3) return false;
		return true;
	}
	if (nh==3 && nn==0) return true;
	if (nh>3)
	{
		if (b==1) {nn--;nh--; nh--;}
		if (e==2) {nn--; nh--;nh--;}
		if (nn<=0) return true;
		if (2*nn>nh) return false;
	}
	return true;
}

bool count1 (int i1b, int i1e,int i2b, int i2e, long long n1, long long n2)
{
	int ni1b, ni1e, ni2b,ni2e;
	long long nn1,nn2;
	long long kk=0;
	if (!check (i1b, i1e,n1,n)) return false;
	if (!check (i2b,i2e, n2,m)) return false;

	for (int i= 3; i<=k; i++)
	{
		kk= n1+n2;
		if (i1e ==1 && i2b ==2) kk++;
		ni2b = i1b; ni2e = i2e;
		ni1b= i2b; ni1e = i2e;
		nn1 = n2; nn2 = kk;
		i1b = ni1b; i1e = ni1e; i2b = ni2b; i2e = ni2e; n1= nn1; n2 = nn2;
	}
	if (kk==x) {  return true;  }
		else return false;
}

void print (int b, int e, int nn, int nh)
{
	//int nh = n;
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	if (b==1) cout << "A"; if (b==2) cout << "C"; if (b==3) cout << "X";
	nh--;
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	if (nn>=1 && b==1) {cout << "C"; nn--; nh--;}
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	while (true)
	{
		if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
		if (nh==2 && nn==1) {cout << "AC"; return;}
		if (nn==1 && e==2) break;
		if (nn>=1) {cout << "AC"; nh--; nh--; nn--;}
		if (nn==0) break;
		//if (nn==1 && e==2) break;
	}
	while (true)
	{
	   if (nh==2 && nn==1) {cout << "AC"; return;}
	   if (nh==1) break;
	   cout << "X"; nh--;
	}
	if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X";

}
int main()
{
	//freopen ("input.txt", "r", stdin);

	cin >> k>> x>> n>>m;
	for (int i =0; i<=n/2; i++)
		for (int j=0; j<=m/2; j++)
		{
			bool flag = false;
			for (int ii = 1; ii<=3; ii++)
				for (int iii = 1; iii<=3; iii++)
					for (int jjj =1; jjj<=3; jjj++)
						for (int jj =1; jj<=3; jj++)
				{
					flag = count1 (ii,iii,jj,jjj,i,j);
					if (flag) 			{ print (ii,iii,i, n); cout << endl; print (jj,jjj,j,m); cout << endl; return 0;}
						}
		}
	cout << "Happy new year!";
	return 0;

}


#include <iostream>

using namespace std;

int k, x,n,m,nn,mm;

bool check (int b, int e, int nn, int nh)
{
	if (b!=e && nh==1) return false;
	if (2*nn>nh) return false;
	if (nh==1 && nn>0) return false;
	if (nh==2 && b==1 && e==2 && nn==0) return false;
	if (nh==2 && nn>0)
	{
		if (b==1 && e==2 && nn==1) return true;
		return false;
	}
	if (nh==3 && nn>1) return false;
	if (nh==3 && nn==1)
	{
		if (b==3 && e==3) return false;
		if (b==2 && e==1) return false;
		if (b==3 && e==1) return false;
		if (b==2 && e==3) return false;
		return true;
	}
	if (nh==3 && nn==0) return true;
	if (nh>3)
	{
		if (b==1) {nn--;nh--; nh--;}
		if (e==2) {nn--; nh--;nh--;}
		if (nn<=0) return true;
		if (2*nn>nh) return false;
	}
	return true;
}

bool count1 (int i1b, int i1e,int i2b, int i2e, int n1, int n2)
{
	int ni1b, ni1e, ni2b,ni2e, nn1,nn2;
	long long kk=0;
	if (!check (i1b, i1e,n1,n)) return false;
	if (!check (i2b,i2e, n2,m)) return false;

	for (int i= 3; i<=k; i++)
	{
		kk= n1+n2;
		if (i1e ==1 && i2b ==2) kk++;
		ni2b = i1b; ni2e = i2e;
		ni1b= i2b; ni1e = i2e;
		nn1 = n2; nn2 = kk;
		i1b = ni1b; i1e = ni1e; i2b = ni2b; i2e = ni2e; n1= nn1; n2 = nn2;
	}
	if (kk==x) return true;
		else return false;
}

void print (int b, int e, int nn, int nh)
{
	//int nh = n;
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	if (b==1) cout << "A"; if (b==2) cout << "C"; if (b==3) cout << "X";
	nh--;
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	if (nn>=1 && b==1) {cout << "C"; nn--; nh--;}
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	while (true)
	{
		if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
		if (nh==2 && nn==1) {cout << "AC"; return;}
		if (nn==1 && e==2) break;
		if (nn>=1) {cout << "AC"; nh--; nh--; nn--;}
		if (nn==0) break;
		//if (nn==1 && e==2) break;
	}
	while (true)
	{
	   if (nh==2 && nn==1) {cout << "AC"; return;}
	   if (nh==1) break;
	   cout << "X"; nh--;
	}
	if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X";

}
int main()
{
	freopen ("input.txt", "r", stdin);

	cin >> k>> x>> n>>m;
	for (int i =0; i<=n/2; i++)
		for (int j=0; j<=m/2; j++)
		{
			bool flag = false;
			for (int ii = 1; ii<=3; ii++)
				for (int iii = 1; iii<=3; iii++)
					for (int jjj =1; jjj<=3; jjj++)
						for (int jj =1; jj<=3; jj++)
				{
					flag = count1 (ii,iii,jj,jjj,i,j);
					if (flag)
					{ print (ii,iii,i, n); cout << endl; print (jj,jjj,j,m); cout << endl; return 0;}
						}
		}
	cout << "Happy new year!";
	return 0;

}


#include <iostream>

using namespace std;

int k, x,n,m,nn,mm;

bool check (int b, int e, int nn, int nh)
{
	if (b!=e && nh==1) return false;
	if (2*nn>nh) return false;
	if (nh==1 && nn>0) return false;
	if (nh==2 && b==1 && e==2 && nn==0) return false;
	if (nh==2 && nn>0)
	{
		if (b==1 && e==2 && nn==1) return true;
		return false;
	}
	if (nh==3 && nn>1) return false;
	if (nh==3 && nn==1)
	{
		if (b==3 && e==3) return false;
		if (b==2 && e==1) return false;
		if (b==3 && e==1) return false;
		if (b==2 && e==3) return false;
		return true;
	}
	if (nh==3 && nn==0) return true;
	if (nh>3)
	{
		if (b==1) {nn--;nh--; nh--;}
		if (e==2) {nn--; nh--;nh--;}
		if (nn<=0) return true;
		if (2*nn>nh) return false;
	}
	return true;
}

bool count1 (int i1b, int i1e,int i2b, int i2e, int n1, int n2)
{
	int ni1b, ni1e, ni2b,ni2e, nn1,nn2;
	long long kk=0;
	if (!check (i1b, i1e,n1,n)) return false;
	if (!check (i2b,i2e, n2,m)) return false;

	for (int i= 3; i<=k; i++)
	{
		kk= n1+n2;
		if (i1e ==1 && i2b ==2) kk++;
		ni2b = i1b; ni2e = i2e;
		ni1b= i2b; ni1e = i2e;
		nn1 = n2; nn2 = kk;
		i1b = ni1b; i1e = ni1e; i2b = ni2b; i2e = ni2e; n1= nn1; n2 = nn2;
	}
	if (kk==x) return true;
		else return false;
}

void print (int b, int e, int nn, int nh)
{
	//int nh = n;
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	if (b==1) cout << "A"; if (b==2) cout << "C"; if (b==3) cout << "C";
	nh--;
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	if (nn>1 && b==1) {cout << "C"; nn--; nh--;}
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	while (true)
	{
		if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
		if (nh==2 && nn==1) {cout << "AC"; return;}
		if (nn==1 && e==2) break;
		if (nn>=1) {cout << "AC"; nh--; nh--; nn--;}
		if (nn==0) break;
		//if (nn==1 && e==2) break;
	}
	while (true)
	{
	   if (nh==2 && nn==1) {cout << "AC"; return;}
	   if (nh==1) break;
	   cout << "X"; nh--;
	}
	if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X";

}
int main()
{
	//freopen ("input.txt", "r", stdin);

	cin >> k>> x>> n>>m;
	for (int i =0; i<=n/2; i++)
		for (int j=0; j<=m/2; j++)
		{
			bool flag = false;
			for (int ii = 1; ii<=3; ii++)
				for (int iii = 1; iii<=3; iii++)
					for (int jjj =1; jjj<=3; jjj++)
						for (int jj =1; jj<=3; jj++)
				{
					flag = count1 (ii,iii,jj,jjj,i,j);
					if (flag) { print (ii,iii,i, n); cout << endl; print (jj,jjj,j,m); cout << endl; return 0;}
				}
		}
	cout << "Happy new year!";
	return 0;

}


#include <iostream>

using namespace std;

int k, x,n,m,nn,mm;

bool check (int b, int e, int nn, int nh)
{
	if (b!=e && nh==1) return false;
	if (2*nn>nh) return false;
	if (nh==1 && nn>0) return false;
	if (nh==2 && b==1 && e==2 && nn==0) return false;
	if (nh==2 && nn>0)
	{
		if (b==1 && e==2 && nn==1) return true;
		return false;
	}
	if (nh==3 && nn>1) return false;
	if (nh==3 && nn==1)
	{
		if (b==3 && e==3) return false;
		if (b==2 && e==1) return false;
		if (b==3 && e==1) return false;
		if (b==2 && e==3) return false;
		return true;
	}
	if (nh==3 && nn==0) return true;
	if (nh>3)
	{
		if (b==1) {nn--;nh--; nh--;}
		if (e==2) {nn--; nh--;nh--;}
		if (nn<=0) return true;
		if (2*nn>nh) return false;
	}
	return true;
}

bool count1 (int i1b, int i1e,int i2b, int i2e, int n1, int n2)
{
	int ni1b, ni1e, ni2b,ni2e, nn1,nn2;
	long long kk=0;
	if (!check (i1b, i1e,n1,n)) return false;
	if (!check (i2b,i2e, n2,m)) return false;

	for (int i= 3; i<=k; i++)
	{
		kk= n1+n2;
		if (i1e ==1 && i2b ==2) kk++;
		ni2b = i1b; ni2e = i2e;
		ni1b= i2b; ni1e = i2e;
		nn1 = n2; nn2 = kk;
		i1b = ni1b; i1e = ni1e; i2b = ni2b; i2e = ni2e; n1= nn1; n2 = nn2;
	}
	if (kk==x) return true;
		else return false;
}

void print (int b, int e, int nn)
{
	int nh = n;
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	if (b==1) cout << "A"; if (b==2) cout << "C"; if (b==3) cout << "C";
	nh--;
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X" return;}
	if (nn>1 && b==1) {cout << "C"; nn--; nh--;}
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	while (true)
	{
		if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
		if (nh==2 && nn==1) {cout << "AC"; return;}
		if (nn==1 && e==2) break;
		if (nn>=1) {cout << "AC"; nh--; nh--; nn--;}
		if (nn==0) break;
		//if (nn==1 && e==2) break;
	}
	while (true)
	{
	   if (nh==2 && nn==1) {cout << "AC"; return;}
	   if (nh==1) break;
	   cout << "X"; nh--;
	}
	if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X";

}
int main()
{
	//freopen ("input.txt", "r", stdin);

	cin >> k>> x>> n>>m;
	for (int i =0; i<=n/2; i++)
		for (int j=0; j<=m/2; j++)
		{
			bool flag = false;
			for (int ii = 1; ii<=3; ii++)
				for (int iii = 1; iii<=3; iii++)
					for (int jjj =1; jjj<=3; jjj++)
						for (int jj =1; jj<=3; jj++)
				{
					flag = count1 (ii,iii,jj,jjj,i,j);
					if (flag) { print (ii,iii,i); cout << endl; print (jj,jjj,j); cout << endl; return 0;}
				}
		}
	cout << "Happy new year!";
	return 0;

}


#include <iostream>

using namespace std;

int k, x,n,m,nn,mm;

bool check (int b, int e, int nn, int nh)
{
	if (b!=e && nh==1) return false;
	if (2*nn>nh) return false;
	if (nh==1 && nn>0) return false;
	if (nh==2 && b==1 && e==2 && nn==0) return false;
	if (nh==2 && nn>0)
	{
		if (b==1 && e==2 && nn==1) return true;
		return false;
	}
	if (nh==3 && nn>1) return false;
	if (nh==3 && nn==1)
	{
		if (b==3 && e==3) return false;
		if (b==2 && e==1) return false;
		if (b==3 && e==1) return false;
		if (b==2 && e==3) return false;
		return true;
	}
	if (nh==3 && nn==0) return true;
	if (nh>3)
	{
		if (b==1) {nn--;nh--; nh--;}
		if (e==2) {nn--; nh--;nh--;}
		if (nn<=0) return true;
		if (2*nn>nh) return false;
	}
	return true;
}

bool count1 (int i1b, int i1e,int i2b, int i2e, int n1, int n2)
{
	int ni1b, ni1e, ni2b,ni2e, nn1,nn2;
	long long kk=0;
	if (!check (i1b, i1e,n1,n)) return false;
	if (!check (i2b,i2e, n2,m)) return false;

	for (int i= 3; i<=k; i++)
	{
		kk= n1+n2;
		if (i1e ==1 && i2b ==2) kk++;
		ni2b = i1b; ni2e = i2e;
		ni1b= i2b; ni1e = i2e;
		nn1 = n2; nn2 = kk;
		i1b = ni1b; i1e = ni1e; i2b = ni2b; i2e = ni2e; n1= nn1; n2 = nn2;
	}
	if (kk==x) return true;
		else return false;
}

void print (int b, int e, int nn)
{
	int nh = n;
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	if (b==1) cout << "A"; if (b==2) cout << "C"; if (b==3) cout << "C";
	nh--;
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	if (nn>1 && b==1) {cout << "C"; nn--; nh--;}
	if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
	while (true)
	{
		if (nh==1) {if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X"; return;}
		if (nh==2 && nn==1) {cout << "AC"; return;}
		if (nn==1 && e==2) break;
		if (nn>=1) {cout << "AC"; nh--; nh--; nn--;}
		if (nn==0) break;
		//if (nn==1 && e==2) break;
	}
	while (true)
	{
	   if (nh==2 && nn==1) {cout << "AC"; return;}
	   if (nh==1) break;
	   cout << "X"; nh--;
	}
	if (e==1) cout << "A"; if (e==2) cout << "C"; if (e==3) cout << "X";

}
int main()
{
	//freopen ("input.txt", "r", stdin);

	cin >> k>> x>> n>>m;
	for (int i =0; i<=n/2; i++)
		for (int j=0; j<=m/2; j++)
		{
			bool flag = false;
			for (int ii = 1; ii<=3; ii++)
				for (int iii = 1; iii<=3; iii++)
					for (int jjj =1; jjj<=3; jjj++)
						for (int jj =1; jj<=3; jj++)
				{
					flag = count1 (ii,iii,jj,jjj,i,j);
					if (flag) { print (ii,iii,i); cout << endl; print (jj,jjj,j); cout << endl; return 0;}
				}
		}
	cout << "Happy new year!";
	return 0;

}


#pragma comment(linker, "/stack:20000000")
#define _CRT_SECURE_NO_WARNINGS

# include <iostream>
# include <cmath>
# include <algorithm>
# include <cstdio>
# include <cstring>
# include <string>
# include <cstdlib>
# include <vector>
# include <bitset>
# include <map>
# include <queue>
# include <ctime>
# include <stack>
# include <set>
# include <list>
# include <deque>
# include <functional>
# include <sstream>
# include <fstream>
# include <complex>
using namespace std;

#define DEBUG

#define DB(x) cout<<#x<<"="<<x<<" "
#define DBN(x) cout<<#x<<"="<<x<<"\n"

#ifdef DEBUG
#define D(x) DEBN(x)
#define DN(x) DEBN(x)
#define DA(a,n) cout<<#a<<"=["; printarray(a,n); cout<<"]\n"
#define DAR(a,n,s) cout<<#a<<"["<<s<<"-"<<n-1<<"]=["; printarray(a,n,s); cout<<"]\n"
#else
#define D(x)
#define DN(x)
#define DA(a,n)
#define DAR(a,n,s)
#endif

double __begin;
#define DTIME(ccc) __begin = clock(); ccc; std::cerr<<"Time of work = "<<(clock()-__begin)/CLOCKS_PER_SEC<<std::endl;

#define mp make_pair
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<long long,long long> pll;
typedef vector<int> vi;
typedef vector<long long> vll;

template<typename T1,typename T2,typename T3>
struct triple{T1 a;T2 b;T3 c;triple(){};triple(T1 _a,T2 _b, T3 _c):a(_a),b(_b),c(_c){}};
#define tri triple<int,int,int>
#define trl triple<ll,ll,ll>
template<typename T1,typename T2,typename T3>
bool operator<(const triple<T1,T2,T3> &t1,const triple<T1,T2,T3> &t2){if (t1.a!=t2.a) return t1.a<t2.a; else return t1.b<t2.b;}

#define FI(n) for(int i=0;i<n;i++)
#define FI1(n) for(int i=1;i<n;i++)
#define FJ(n) for(int j=0;j<n;j++)
#define FJ1(n) for(int j=1;j<n;j++)
#define FJI for(int j=0;j<i;j++)
#define FJI1 for(int j=1;j<i;j++)
#define FJIE for(int j=0;j<=i;j++)
#define FJIE1 for(int j=1;j<=i;j++)
#define For(i,a,b) for(int i=a;i<b;i++)

// Input macros
#define S(n)                        scanf("%d",&n)
#define S2(a,b)                     scanf("%d%d",&a,&b)
#define Sc(n)                       scanf("%c",&n)
#define Sl(n)                       scanf("%I64d",&n)
#define Sl2(a,b)                    scanf("%I64d%I63d",&a,&b)
#define Sf(n)                       scanf("%lf",&n)
#define Sf2(a,b)                    scanf("%lf%lf",&a,&b)

//Output macros
#define Pr(n)                       printf("%d ",n)
#define Prn(n)                      printf("%d\n",n)
#define Prc(n)                      printf("%c",n)
#define Prcn(n)                     printf("%c\n",n)
#define Prl(n)                      printf("%I64d ",n)
#define Prln(n)                     printf("%I64d\n",n)
#define Prf(n)                      printf("%lf ",n)
#define Prfn(n)                     printf("%lf\n",n)
#define Prs(n)                      printf("%s ",n)
#define Prsn(n)                     printf("%s\n",n)

//STL containers
#define foreach(v, c)               for( auto v = (c).begin();  v != (c).end(); ++v)
#define all(a)                      a.begin(), a.end()
#define in(a,b)                     ((b).find(a) != (b).end())
#define in2(a,b)                    (find(all(b),a) != (b).end())
#define pb                          push_back
#define sz(a)                       ((int)(a.size()))
#define svi(vec,n) FI(n) S(vec[y])
#define svl(vec,n) FI(n) Sl(vec[y])
#define IT ::iterator

//int some_primes[10] = {100271, 500179, 1000003, 2000227, 5000321}
//fill char arrays
#define fill(a,v)                    memset(a, v, sizeof (a))

inline int bits_count(int v){v=v-((v>>1)&0x55555555);v=(v&0x33333333)+((v>>2)&0x33333333);return((v+(v>>4)&0xF0F0F0F)*0x1010101)>>24;}
unsigned int reverse_bits(register unsigned int x){x = (((x & 0xaaaaaaaa) >> 1) | ((x & 0x55555555) << 1));x = (((x & 0xcccccccc) >> 2) | ((x & 0x33333333) << 2));x = (((x & 0xf0f0f0f0) >> 4) | ((x & 0x0f0f0f0f) << 4));x = (((x & 0xff00ff00) >> 8) | ((x & 0x00ff00ff) << 8));return((x >> 16) | (x << 16));}
inline int sign(int x){return (x >> 31) | (-x >> 31);}
inline bool ispow2(int x){return (x!=0 && (x&(x-1))==0);}
#define checkbit(n,b)                ( (n >> b) & 1)
#define INDEX(arr,ind)               (lower_bound(all(arr),ind)-arr.begin())
#define sor(a)  sort(all(a))
#define rsor(a) sort(all(a)); reverse(all(a));

//STL output ********************************
template<typename T1,typename T2>inline std::ostream& operator << (std::ostream& os, const std::pair<T1, T2>& p){return os << "(" << p.first << ", " << p.second << ")";}
template<typename T>inline std::ostream &operator<<(std::ostream &os,const std::vector<T>& v){bool first=true;os<<"[";for(unsigned int i=0;i<v.size();i++){if(!first)os<<", ";os<<v[i];first=false;}return os<<"]";}
template<typename T>inline std::ostream &operator<<(std::ostream &os,const std::set<T>&v){bool first=true;os << "[";for(typename std::set<T>::const_iterator ii=v.begin();ii!=v.end();++ii){if(!first)os<<", ";os<<*ii;first=false;}return os<<"]";}
template<typename T1, typename T2>inline std::ostream &operator << (std::ostream & os,const std::map<T1, T2>& v){bool first = true; os << "[";for (typename std::map<T1,T2>::const_iterator ii =v.begin();ii!=v.end();++ii){if(!first)os<<", ";os<<*ii;first=false;}return os<<"]";}
template<typename T,typename T2>void printarray(T  a[],T2 sz,T2 beg=0){for(T2 i=beg;i<sz;i++) cout<<a[i]<<" ";cout<<endl;}

#define FREIN(FILE) freopen(FILE,"rt",stdin)
#define FREOUT(FILE) freopen(FILE,"wt",stdout)

#define sqr(x) ((x)*(x))
#define sqrt(x) sqrt(1.0*(x))
#define pow(x,n) pow(1.0*(x),n)

inline ll binpow(ll x,ll n){ll res=1;while(n){if(n&1)res*=x;x*=x;n>>=1;}return res;}
inline ll powmod(ll x,ll n, ll _mod){ll res=1;while(n){if(n&1)res=(res*x)%_mod;x=(x*x)%_mod;n>>=1;}return res;}
inline ll gcd(ll a,ll b){ll t;while(b){a=a%b;t=a;a=b;b=t;}return a;}
inline int gcd(int a,int b){int t;while(b){a=a%b;t=a;a=b;b=t;}return a;}
inline ll lcm(int a,int b){return a/gcd(a,b)*(ll)b;}
inline ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
inline ll gcd(ll a,ll b,ll c){return gcd(gcd(a,b),c);}
inline int gcd(int a,int b,int c){return gcd(gcd(a,b),c);}
inline ll lcm(ll a,ll b,ll c){return lcm(lcm(a,b),c);}
inline ll lcm(int a,int b,int c){return lcm(lcm(a,b),(ll)c);}

inline ll max(ll a,ll b){return (a>b)?a:b;}
inline int max(int a,int b){return (a>b)?a:b;}
inline double max(double a,double b){return (a>b)?a:b;}
inline ll max(ll a,ll b,ll c){return max(a,max(b,c));}
inline int max(int a,int b,int c){return max(a,max(b,c));}
inline double max(double a,double b,double c){return max(a,max(b,c));}
inline ll min(ll a,ll b){return (a<b)?a:b;}
inline int min(int a,int b){return (a<b)?a:b;}
inline double min(double a,double b){return (a<b)?a:b;}
inline ll min(ll a,ll b,ll c){return min(a,min(b,c));}
inline int min(int a,int b,int c){return min(a,min(b,c));}
inline double min(double a,double b,double c){return min(a,min(b,c));}
inline void getar(int *a,int n){for (int ii=0;ii<n;ii++){scanf("%d",a+ii);}}
inline void getar(ll *a,int n){for (int ii=0;ii<n;ii++){scanf("%I64",a+ii);}}

// Useful constants

#define INF         1011111111
#define EPS         (double)1e-8
#define mod         1000000007
#define PI          3.14159265358979
//******************************************************************************

int a[100];
ll t[100];
bool ax[100];
bool cx[100];

int k, xx, n, m;
bool check(int x, int y)
{
    int leni = x * 2;
    int lenj = y * 2;
    t[1] = x;
    t[2] = y;
    for (int s = 3; s <= k; ++s)
    {
        t[s] = t[s - 1] + t[s - 2];
    }
    if (t[k] == xx)
    {
        for (int s = 0; s < x; ++s)
        {
            cout << "AC";
        }
        for (int s = 0; s < n - leni; ++s)
        {
            cout << "B";
        }
        cout << endl;
        for (int i = 0; i < y; ++i)
        {
            cout << "AC";
        }
        for (int i = 0; i < m - lenj; ++i)
        {
            cout << "B";
        }
        cout << endl;
        exit(0);
    }
}
bool checkf(int x, int y, int fa, int sa, int fc, int sc)
{
    int leni = x * 2;
    if (leni + fc + fa > n) return false;
    int lenj = y * 2;
    if (lenj + sc + sa > m) return false;
    ax[1] = fa;
    ax[2] = sa;
    cx[1] = fc;
    cx[2] = sc;
    t[1] = x;
    t[2] = y;
    for (int s = 3; s <= k; ++s)
    {
        t[s] = t[s - 1] + t[s - 2];
        if (cx[s - 1] && ax[s - 2])
        {
            t[s]++;
        }
        ax[s] = ax[s - 1];
        cx[s] = cx[s - 2];
    }
    if (t[k] == xx)
    {
        if (fc) cout << "C";
        for (int s = 0; s < x; ++s)
        {
            cout << "AC";
        }
        for (int s = 0; s < n - leni - fc - fa; ++s)
        {
            cout << "B";
        }
        if (fa) cout << "A";
        cout << endl;
        if (sc) cout << "C";
        for (int i = 0; i < y; ++i)
        {
            cout << "AC";
        }
        for (int i = 0; i < m - lenj - sc - sa; ++i)
        {
            cout << "B";
        }
        if (sa) cout << "A";
        cout << endl;
        exit(0);
    }
}
int main()
{
    cin >> k >> xx >> n >> m;
    a[1] = n;
    a[2] = m;
    for (int i = 0; i <= n/2; ++i)
    {
        for (int j = 0; j <= m / 2; ++j)
        {
            check(i, j);
            for (int t = 1; t < (1 << 4); ++t)
            {
                checkf(i, j, checkbit(t, 0), checkbit(t, 1), checkbit(t, 2), checkbit(t, 3));
            }

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


#include <iostream>
#include <string>

using namespace std;

__int16 k,Ls1,Ls2;
__int16 maxS1,maxS2;
__int64 x,tx;

string s1,s2,sk;

__int16 xs1,xs2;
__int64 e12,e21,e22,ns1,ns2;
bool bh1,bt1,bh2,bt2,res;

void full(string &a,__int16 b,__int16 c,bool h,bool t)
{
	if(h)
	{
		a='C';
		c--;
	}
	else
		a="";
	for(;b>0;b--,c-=2)
		a+="AC";
	for(;c>1;c--)
		a+='B';
	if(c>0)
	    a+=t?'A':'B';
}

bool t_check()
{
	for(xs1=0,xs2=-1;xs1<=maxS1;xs1++)
		if((tx - ns1*xs1) % ns2 == 0 && (tx - ns1*xs1) / ns2 <= maxS2)
		{
			xs2 = (tx - ns1*xs1) / ns2;
			break;
		}
	if(xs2!=-1)
	{
		full(s1,xs1,Ls1,bh1,bt1);
		full(s2,xs2,Ls2,bh2,bt2);
		return true;
	}
	else
		return false;
}
bool t_find() //if(Ls1>=2 && Ls2>=2)
{
	//x = ns1*xs1 + ns2*xs2
	maxS1 = Ls1/2;
	maxS2 = Ls2/2;
	bh1 = false;
	bt1 = false;
	bh2 = false;
	bt2 = false;
	tx = x;
	if(t_check())
		return true;

	//s1: tail-head; s2: ...
	//s1: ...; s2: tail-head
	//s1: tail; s2:head
	//s1: head; s2:tail
	//s1: tail; s2:tail-head
	//s1: head; s2:tail-head
	//s1: tail-head; s2:tail-head

	//x = ns1*xs1 + ns2*xs2 + e22
	maxS1 = Ls1/2;
	maxS2 = (Ls2-2)/2;
	bh1 = false;
	bt1 = false;
	bh2 = true;
	bt2 = true;
	tx = x-e22;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e12
	maxS1 = (Ls1-1)/2;
	maxS2 = (Ls2-1)/2;
	bh1 = false;
	bt1 = true;
	bh2 = true;
	bt2 = false;
	tx = x-e12;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e21
	maxS1 = (Ls1-1)/2;
	maxS2 = (Ls2-1)/2;
	bh1 = true;
	bt1 = false;
	bh2 = false;
	bt2 = true;
	tx = x-e21;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e22+e12
	maxS1 = (Ls1-1)/2;
	maxS2 = (Ls2-2)/2;
	bh1 = false;
	bt1 = true;
	bh2 = true;
	bt2 = true;
	tx = x-e22-e12;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e22+e21
	maxS1 = (Ls1-1)/2;
	maxS2 = (Ls2-2)/2;
	bh1 = true;
	bt1 = false;
	bh2 = true;
	bt2 = true;
	tx = x-e22-e21;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e12+e21+e22
	maxS1 = (Ls1-2)/2;
	maxS2 = (Ls2-2)/2;
	bh1 = true;
	bt1 = true;
	bh2 = true;
	bt2 = true;
	tx = x-e12-e21-e22;
	if(t_check())
		return true;
	return false;
}

bool t1_check(char tch)
{
	if(tx%ns2==0 && (tx/ns2)<=maxS2)
	{
		xs2=tx/ns2;
		s1=tch;
		full(s2,xs2,Ls2,bh2,bt2);
		return true;
	}
	else
		return false;
}
bool t1_find() //if(Ls1==1 && Ls2>=2)
{
	maxS1 = 0;

	//x = ns2*xs2
	maxS2 = Ls2/2;
	bh2 = false;
	bt2 = false;
	tx = x;
	if(t1_check('A'))
		return true;

	//s1: A; s2: ...
	//s1: tail; s2:head
	//s1: head; s2:tail
	//s1: tail; s2:tail-head
	//s1: head; s2:tail-head
	//s1: B; s2:tail-head

	//x = ns2*xs2 + e12
	maxS2 = (Ls2-1)/2;
	bh2 = true;
	bt2 = false;
	tx = x-e12;
	if(t1_check('A'))
		return true;
	//x = ns2*xs2 + e21
	maxS2 = (Ls2-1)/2;
	bh2 = false;
	bt2 = true;
	tx = x-e21;
	if(t1_check('C'))
		return true;
	//x = ns2*xs2 + e22+e12
	maxS2 = (Ls2-2)/2;
	bh2 = true;
	bt2 = true;
	tx = x-e22-e12;
	if(t1_check('A'))
		return true;
	//x = ns2*xs2 + e22+e21
	maxS2 = (Ls2-2)/2;
	bh2 = true;
	bt2 = true;
	tx = x-e22-e21;
	if(t1_check('C'))
		return true;
	//x = ns2*xs2 + e22
	maxS2 = (Ls2-2)/2;
	bh2 = true;
	bt2 = true;
	tx = x-e22;
	if(t1_check('B'))
		return true;
	return false;
}

bool t2_check(char tch)
{
	if(tx%ns1==0 && (tx/ns1)<=maxS1)
	{
		xs1=tx/ns1;
		full(s1,xs1,Ls1,bh1,bt1);
		s2=tch;
		return true;
	}
	else
		return false;
}
bool t2_find() //if(Ls1>=2 && Ls2==1)
{
	maxS2 = 0;

	//x = ns2*xs2
	maxS1 = Ls1/2;
	bh1 = false;
	bt1 = false;
	tx = x;
	if(t2_check('A'))
		return true;

	//s2: A; s1: ...
	//s2: tail; s1:head
	//s2: head; s1:tail
	//s2: tail; s1:tail-head
	//s2: head; s1:tail-head

	//x = ns1*xs1 + e21
	maxS1 = (Ls1-1)/2;
	bh1 = true;
	bt1 = false;
	tx = x-e21;
	if(t2_check('A'))
		return true;
	//x = ns1*xs1 + e12
	maxS1 = (Ls1-1)/2;
	bh1 = false;
	bt1 = true;
	tx = x-e12;
	if(t2_check('C'))
		return true;
	return false;
}

bool t12_find() //if(Ls1==1 && Ls2==1)
{
	//s1:A; s2:A //0
	//s1:A; s2:C //tail-head
	//s1:C; s2:A //head-tail
	//s1:C; s2:C //0
	if(x == 0)
	{
		s1='A';
		s2='A';
		return true;
	}
	else if(x == e12)
	{
		s1='A';
		s2='C';
		return true;
	}
	else if(x == e21)
	{
		s1='C';
		s2='A';
		return true;
	}
	else
		return false;
}

struct Tst
{
	char st_h,st_t;
	__int64 st_e12,st_e21,st_e22,st_ns1,st_ns2;
	Tst()
	{}
	Tst(Tst &p)
	{
		st_h = p.st_h;
		st_t = p.st_t;
		st_e12 = p.st_e12;
		st_e21 = p.st_e21;
		st_e22 = p.st_e22;
		st_ns1 = p.st_ns1;
		st_ns2 = p.st_ns2;
	}
	void operator = (Tst p)
	{
		st_h = p.st_h;
		st_t = p.st_t;
		st_e12 = p.st_e12;
		st_e21 = p.st_e21;
		st_e22 = p.st_e22;
		st_ns1 = p.st_ns1;
		st_ns2 = p.st_ns2;
	}
	void operator = (char p)
	{
		st_h = p;
		st_t = p;
		st_e12 = 0;
		st_e21 = 0;
		st_e22 = 0;
		st_ns1 = (p=='1')?1:0;
		st_ns2 = (p=='2')?1:0;
	}
	Tst operator + (Tst &p)
	{
		Tst res;
		res.st_h = st_h;
		res.st_t = p.st_t;
		res.st_e12 = st_e12+p.st_e12;
		res.st_e21 = st_e21+p.st_e21;
		res.st_e22 = st_e22+p.st_e22;
		if(st_t=='1' && p.st_h=='2')
			res.st_e12++;
		else if(st_t=='2' && p.st_h=='1')
			res.st_e21++;
		else if(st_t=='2' && p.st_h=='2')
			res.st_e22++;
		res.st_ns1 = st_ns1+p.st_ns1;
		res.st_ns2 = st_ns2+p.st_ns2;
		return res;
	}
} st1,st2,seq;

int main()
{
	cin>>k>>x>>Ls1>>Ls2;
	st1='1';
	st2='2';
	for(int i=3;i<=k;i++)
	{
		seq=st1+st2;
		st1=st2;
		st2=seq;
	}
	e12 = seq.st_e12;
	e21 = seq.st_e21;
	e22 = seq.st_e22;
	ns1 = seq.st_ns1;
	ns2 = seq.st_ns2;
	if(x==0)
	{
		s1="";
		s2="";
		for(int i=0;i<Ls1;i++)
			s1+='A';
		for(int i=0;i<Ls2;i++)
			s2+='A';
		res = true;
	}
	else if(Ls1>=2 && Ls2>=2)
		res = t_find();
	else if(Ls1==1 && Ls2==1)
		res = t12_find();
	else if(Ls1==1)
		res = t1_find();
	else if(Ls2==1)
		res = t2_find();
	if(res)
		cout<<s1<<endl<<s2<<endl;
	else
		cout<<"Happy new year!"<<endl;
	cin.get();
	cin.get();
}


#include <iostream>
#include <string>

using namespace std;

__int16 k,Ls1,Ls2;
__int16 maxS1,maxS2;
__int64 x,tx;

string s1,s2,sk;
string seq;
string st1,st2;

__int16 xs1,xs2;
__int64 e11,e12,e21,e22,ns1,ns2;
bool bh1,bt1,bh2,bt2,res;

void full(string &a,__int16 b,__int16 c,bool h,bool t)
{
	if(h)
	{
		a='C';
		c--;
	}
	else
		a="";
	for(;b>0;b--,c-=2)
		a+="AC";
	if(t)
		for(;c>0;c--)
			a+='A';
	else
		for(;c>0;c--)
			a+='C';
}

bool t_check()
{
	for(xs1=0,xs2=0;xs1<=maxS1;xs1++)
		if((tx - ns1*xs1) % ns2 == 0 && (tx - ns1*xs1) / ns2 <= maxS2)
		{
			xs2 = (tx - ns1*xs1) / ns2;
			break;
		}
	if(xs2!=0)
	{
		full(s1,xs1,Ls1,bh1,bt1);
		full(s2,xs2,Ls2,bh2,bt2);
		return true;
	}
	else
		return false;
}
bool t_find() //if(Ls1>=2 && Ls2>=2)
{
	//x = ns1*xs1 + ns2*xs2
	maxS1 = Ls1/2;
	maxS2 = Ls2/2;
	bh1 = false;
	bt1 = false;
	bh2 = false;
	bt2 = false;
	tx = x;
	if(t_check())
		return true;

	//s1: tail-head; s2: ...
	//s1: ...; s2: tail-head
	//s1: tail; s2:head
	//s1: head; s2:tail
	//s1: tail-head; s2:tail
	//s1: tail-head; s2:head
	//s1: tail; s2:tail-head
	//s1: head; s2:tail-head
	//s1: tail-head; s2:tail-head

	//x = ns1*xs1 + ns2*xs2 + e11
	maxS1 = (Ls1-2)/2;
	maxS2 = Ls2/2;
	bh1 = true;
	bt1 = true;
	bh2 = false;
	bt2 = false;
	tx = x-e11;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e22
	maxS1 = Ls1/2;
	maxS2 = (Ls2-2)/2;
	bh1 = false;
	bt1 = false;
	bh2 = true;
	bt2 = true;
	tx = x-e22;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e12
	maxS1 = (Ls1-1)/2;
	maxS2 = (Ls2-1)/2;
	bh1 = false;
	bt1 = true;
	bh2 = true;
	bt2 = false;
	tx = x-e12;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e21
	maxS1 = (Ls1-1)/2;
	maxS2 = (Ls2-1)/2;
	bh1 = true;
	bt1 = false;
	bh2 = false;
	bt2 = true;
	tx = x-e21;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e11+e12
	maxS1 = (Ls1-2)/2;
	maxS2 = (Ls2-1)/2;
	bh1 = true;
	bt1 = true;
	bh2 = true;
	bt2 = false;
	tx = x-e11-e12;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e11+e21
	maxS1 = (Ls1-2)/2;
	maxS2 = (Ls2-1)/2;
	bh1 = true;
	bt1 = true;
	bh2 = false;
	bt2 = true;
	tx = x-e11-e21;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e22+e12
	maxS1 = (Ls1-1)/2;
	maxS2 = (Ls2-2)/2;
	bh1 = false;
	bt1 = true;
	bh2 = true;
	bt2 = true;
	tx = x-e22-e12;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e22+e21
	maxS1 = (Ls1-1)/2;
	maxS2 = (Ls2-2)/2;
	bh1 = false;
	bt1 = true;
	bh2 = true;
	bt2 = true;
	tx = x-e22-e21;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e11+e12+e21+e22
	maxS1 = (Ls1-2)/2;
	maxS2 = (Ls2-2)/2;
	bh1 = true;
	bt1 = true;
	bh2 = true;
	bt2 = true;
	tx = x-e11-e12-e21-e22;
	if(t_check())
		return true;
}

bool t1_check(char tch)
{
	if(tx%ns2==0 && (tx/ns2)<=maxS2)
	{
		xs2=tx/ns2;
		s1=tch;
		full(s2,xs2,Ls2,bh2,bt2);
		return true;
	}
	else
		return false;
}
bool t1_find() //if(Ls1==1 && Ls2>=2)
{
	maxS1 = 0;

	//x = ns2*xs2
	maxS2 = Ls2/2;
	bh2 = false;
	bt2 = false;
	tx = x;
	if(t1_check('A'))
		return true;

	//s1: A; s2: ...
	//s1: tail; s2:head
	//s1: head; s2:tail
	//s1: tail; s2:tail-head
	//s1: head; s2:tail-head

	//x = ns2*xs2 + e12
	maxS2 = (Ls2-1)/2;
	bh2 = true;
	bt2 = false;
	tx = x-e12;
	if(t1_check('A'))
		return true;
	//x = ns2*xs2 + e21
	maxS2 = (Ls2-1)/2;
	bh2 = false;
	bt2 = true;
	tx = x-e21;
	if(t1_check('C'))
		return true;
	//x = ns2*xs2 + e22+e12
	maxS2 = (Ls2-2)/2;
	bh2 = true;
	bt2 = true;
	tx = x-e22-e12;
	if(t1_check('A'))
		return true;
	//x = ns2*xs2 + e22+e21
	maxS2 = (Ls2-2)/2;
	bh2 = true;
	bt2 = true;
	tx = x-e22-e21;
	if(t1_check('C'))
		return true;
}

bool t2_check(char tch)
{
	if(tx%ns1==0 && (tx/ns1)<=maxS1)
	{
		xs1=tx/ns1;
		full(s1,xs1,Ls1,bh1,bt1);
		s2=tch;
		return true;
	}
	else
		return false;
}
bool t2_find() //if(Ls1>=2 && Ls2==1)
{
	maxS2 = 0;

	//x = ns2*xs2
	maxS1 = Ls1/2;
	bh1 = false;
	bt1 = false;
	tx = x;
	if(t2_check('A'))
		return true;

	//s2: A; s1: ...
	//s2: tail; s1:head
	//s2: head; s1:tail
	//s2: tail; s1:tail-head
	//s2: head; s1:tail-head

	//x = ns1*xs1 + e21
	maxS1 = (Ls1-1)/2;
	bh1 = true;
	bt1 = false;
	tx = x-e21;
	if(t2_check('A'))
		return true;
	//x = ns1*xs1 + e12
	maxS1 = (Ls1-1)/2;
	bh1 = false;
	bt1 = true;
	tx = x-e12;
	if(t2_check('C'))
		return true;
	//x = ns1*xs1 + e11+e21
	maxS1 = (Ls1-2)/2;
	bh1 = true;
	bt1 = true;
	tx = x-e11-e21;
	if(t2_check('A'))
		return true;
	//x = ns1*xs1 + e11+e12
	maxS1 = (Ls1-2)/2;
	bh1 = true;
	bt1 = true;
	tx = x-e11-e12;
	if(t2_check('C'))
		return true;
}

bool t12_find() //if(Ls1==1 && Ls2==1)
{
	//s1:A; s2:A //0
	//s1:A; s2:C //tail-head
	//s1:C; s2:A //head-tail
	//s1:C; s2:C //0
	if(x == 0)
	{
		s1='A';
		s2='A';
		return true;
	}
	else if(x == e12)
	{
		s1='A';
		s2='C';
		return true;
	}
	else if(x == e21)
	{
		s1='C';
		s2='A';
		return true;
	}
	else
		return false;
}

int main()
{
	cin>>k>>x>>Ls1>>Ls2;
	st1="1";
	st2="2";
	for(int i=3;i<=k;i++)
	{
		seq=st1+st2;
		st1=st2;
		st2=seq;
	}
	for(int i=1;seq[i]!='\0';i++)
	{
		if(seq[i-1]=='1' && seq[i]=='1')
			e11++;
		else if(seq[i-1]=='1' && seq[i]=='2')
			e12++;
		else if(seq[i-1]=='2' && seq[i]=='1')
			e21++;
		else if(seq[i-1]=='2' && seq[i]=='2')
			e22++;
	}
	for(int i=0;seq[i]!='\0';i++)
	{
		if(seq[i]=='1')
			ns1++;
		else
			ns2++;
	}
	if(x==0)
	{
		s1="";
		s2="";
		for(int i=0;i<Ls1;i++)
			s1+='A';
		for(int i=0;i<Ls2;i++)
			s2+='A';
		res = true;
	}
	else if(Ls1>=2 && Ls2>=2)
		res = t_find();
	else if(Ls1==1 && Ls2==1)
		res = t12_find();
	else if(Ls1==1)
		res = t1_find();
	else if(Ls2==1)
		res = t2_find();
	if(res)
		cout<<s1<<endl<<s2<<endl;
	else
		cout<<"Happy new year!"<<endl;
}


#include <iostream>
#include <string>

using namespace std;

__int16 k,Ls1,Ls2;
__int16 maxS1,maxS2;
__int64 x,tx;

string s1,s2,sk;
string seq;
string st1,st2;

__int16 xs1,xs2;
__int64 e11,e12,e21,e22,ns1,ns2;
bool bh1,bt1,bh2,bt2,res;

void full(string &a,__int16 b,__int16 c,bool h,bool t)
{
	if(h)
	{
		a='C';
		c--;
	}
	else
		a="";
	for(;b>0;b--,c-=2)
		a+="AC";
	if(t)
		for(;c>0;c--)
			a+='A';
	else
		for(;c>0;c--)
			a+='C';
}

bool t_check()
{
	for(xs1=0,xs2=0;xs1<=maxS1;xs1++)
		if((tx - ns1*xs1) % ns2 == 0 && (tx - ns1*xs1) / ns2 <= maxS2)
		{
			xs2 = (tx - ns1*xs1) / ns2;
			break;
		}
	if(xs2!=0)
	{
		full(s1,xs1,Ls1,bh1,bt1);
		full(s2,xs2,Ls2,bh2,bt2);
		return true;
	}
	else
		return false;
}
bool t_find() //if(Ls1>=2 && Ls2>=2)
{
	//x = ns1*xs1 + ns2*xs2
	maxS1 = Ls1/2;
	maxS2 = Ls2/2;
	bh1 = false;
	bt1 = false;
	bh2 = false;
	bt2 = false;
	tx = x;
	if(t_check())
		return true;

	//s1: tail-head; s2: ...
	//s1: ...; s2: tail-head
	//s1: tail; s2:head
	//s1: head; s2:tail
	//s1: tail-head; s2:tail
	//s1: tail-head; s2:head
	//s1: tail; s2:tail-head
	//s1: head; s2:tail-head
	//s1: tail-head; s2:tail-head

	//x = ns1*xs1 + ns2*xs2 + e11
	maxS1 = (Ls1-2)/2;
	maxS2 = Ls2/2;
	bh1 = true;
	bt1 = true;
	bh2 = false;
	bt2 = false;
	tx = x-e11;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e22
	maxS1 = Ls1/2;
	maxS2 = (Ls2-2)/2;
	bh1 = false;
	bt1 = false;
	bh2 = true;
	bt2 = true;
	tx = x-e22;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e12
	maxS1 = (Ls1-1)/2;
	maxS2 = (Ls2-1)/2;
	bh1 = false;
	bt1 = true;
	bh2 = true;
	bt2 = false;
	tx = x-e12;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e21
	maxS1 = (Ls1-1)/2;
	maxS2 = (Ls2-1)/2;
	bh1 = true;
	bt1 = false;
	bh2 = false;
	bt2 = true;
	tx = x-e21;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e11+e12
	maxS1 = (Ls1-2)/2;
	maxS2 = (Ls2-1)/2;
	bh1 = true;
	bt1 = true;
	bh2 = true;
	bt2 = false;
	tx = x-e11-e12;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e11+e21
	maxS1 = (Ls1-2)/2;
	maxS2 = (Ls2-1)/2;
	bh1 = true;
	bt1 = true;
	bh2 = false;
	bt2 = true;
	tx = x-e11-e21;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e22+e12
	maxS1 = (Ls1-1)/2;
	maxS2 = (Ls2-2)/2;
	bh1 = false;
	bt1 = true;
	bh2 = true;
	bt2 = true;
	tx = x-e22-e12;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e22+e21
	maxS1 = (Ls1-1)/2;
	maxS2 = (Ls2-2)/2;
	bh1 = false;
	bt1 = true;
	bh2 = true;
	bt2 = true;
	tx = x-e22-e21;
	if(t_check())
		return true;
	//x = ns1*xs1 + ns2*xs2 + e11+e12+e21+e22
	maxS1 = (Ls1-2)/2;
	maxS2 = (Ls2-2)/2;
	bh1 = true;
	bt1 = true;
	bh2 = true;
	bt2 = true;
	tx = x-e11-e12-e21-e22;
	if(t_check())
		return true;
}

bool t1_check(char tch)
{
	if(tx%ns2==0 && (tx/ns2)<=maxS2)
	{
		xs2=tx/ns2;
		s1=tch;
		full(s2,xs2,Ls2,bh2,bt2);
		return true;
	}
	else
		return false;
}
bool t1_find() //if(Ls1==1 && Ls2>=2)
{
	maxS1 = 0;

	//x = ns2*xs2
	maxS2 = Ls2/2;
	bh2 = false;
	bt2 = false;
	tx = x;
	if(t1_check('A'))
		return true;

	//s1: A; s2: ...
	//s1: tail; s2:head
	//s1: head; s2:tail
	//s1: tail; s2:tail-head
	//s1: head; s2:tail-head

	//x = ns2*xs2 + e12
	maxS2 = (Ls2-1)/2;
	bh2 = true;
	bt2 = false;
	tx = x-e12;
	if(t1_check('A'))
		return true;
	//x = ns2*xs2 + e21
	maxS2 = (Ls2-1)/2;
	bh2 = false;
	bt2 = true;
	tx = x-e21;
	if(t1_check('C'))
		return true;
	//x = ns2*xs2 + e22+e12
	maxS2 = (Ls2-2)/2;
	bh2 = true;
	bt2 = true;
	tx = x-e22-e12;
	if(t1_check('A'))
		return true;
	//x = ns2*xs2 + e22+e21
	maxS2 = (Ls2-2)/2;
	bh2 = true;
	bt2 = true;
	tx = x-e22-e21;
	if(t1_check('C'))
		return true;
}

bool t2_check(char tch)
{
	if(tx%ns1==0 && (tx/ns1)<=maxS1)
	{
		xs1=tx/ns1;
		full(s1,xs1,Ls1,bh1,bt1);
		s2=tch;
		return true;
	}
	else
		return false;
}
bool t2_find() //if(Ls1>=2 && Ls2==1)
{
	maxS2 = 0;

	//x = ns2*xs2
	maxS1 = Ls1/2;
	bh1 = false;
	bt1 = false;
	tx = x;
	if(t2_check('A'))
		return true;

	//s2: A; s1: ...
	//s2: tail; s1:head
	//s2: head; s1:tail
	//s2: tail; s1:tail-head
	//s2: head; s1:tail-head

	//x = ns1*xs1 + e21
	maxS1 = (Ls1-1)/2;
	bh1 = true;
	bt1 = false;
	tx = x-e21;
	if(t2_check('A'))
		return true;
	//x = ns1*xs1 + e12
	maxS1 = (Ls1-1)/2;
	bh1 = false;
	bt1 = true;
	tx = x-e12;
	if(t2_check('C'))
		return true;
	//x = ns1*xs1 + e11+e21
	maxS1 = (Ls1-2)/2;
	bh1 = true;
	bt1 = true;
	tx = x-e11-e21;
	if(t2_check('A'))
		return true;
	//x = ns1*xs1 + e11+e12
	maxS1 = (Ls1-2)/2;
	bh1 = true;
	bt1 = true;
	tx = x-e11-e12;
	if(t2_check('C'))
		return true;
}

bool t12_find() //if(Ls1==1 && Ls2==1)
{
	//s1:A; s2:A //0
	//s1:A; s2:C //tail-head
	//s1:C; s2:A //head-tail
	//s1:C; s2:C //0
	if(x == 0)
	{
		s1='A';
		s2='A';
		return true;
	}
	else if(x == e12)
	{
		s1='A';
		s2='C';
		return true;
	}
	else if(x == e21)
	{
		s1='C';
		s2='A';
		return true;
	}
	else
		return false;
}

int main()
{
	cin>>k>>x>>Ls1>>Ls2;
	st1="1";
	st2="2";
	for(int i=3;i<=k;i++)
	{
		seq=st1+st2;
		st1=st2;
		st2=seq;
	}
	for(int i=1;seq[i]!='\0';i++)
	{
		if(seq[i-1]=='1' && seq[i]=='1')
			e11++;
		else if(seq[i-1]=='1' && seq[i]=='2')
			e12++;
		else if(seq[i-1]=='2' && seq[i]=='1')
			e21++;
		else if(seq[i-1]=='2' && seq[i]=='2')
			e22++;
	}
	for(int i=0;seq[i]!='\0';i++)
	{
		if(seq[i]=='1')
			ns1++;
		else
			ns2++;
	}
	if(x==0)
	{
		s1="";
		s2="";
		for(int i=0;i<Ls1;i++)
			s1+='A';
		for(int i=0;i<Ls2;i++)
			s2+='A';
		res = true;
	}
	if(Ls1>=2 && Ls2>=2)
		res = t_find();
	else if(Ls1==1 && Ls2==1)
		res = t12_find();
	else if(Ls1==1)
		res = t1_find();
	else if(Ls2==1)
		res = t2_find();
	if(res)
		cout<<s1<<endl<<s2<<endl;
	else
		cout<<"Happy new year!"<<endl;
}