#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

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(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;

__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;
}

struct Tst
{
	char st_h,st_t;
	__int64 st_e11,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_e11 = p.st_e11;
		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_e11 = p.st_e11;
		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_e11 = 0;
		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_e11 = st_e11+p.st_e11;
		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=='1')
			res.st_e11++;
		else 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;
	}
	e11 = seq.st_e11;
	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;
}


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

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;

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 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()
{
    maxS1 = Ls1/2;
    maxS2 = Ls2/2;
    bh1 = false;
    bt1 = false;
    bh2 = false;
    bt2 = false;
    tx = x;
    if(check())
        return true;

    maxS1 = (Ls1-2)/2;
    maxS2 = Ls2/2;
    bh1 = true;
    bt1 = true;
    bh2 = false;
    bt2 = false;
    tx = x-e11;
    if(check())
        return true;

    maxS1 = Ls1/2;
    maxS2 = (Ls2-2)/2;
    bh1 = false;
    bt1 = false;
    bh2 = true;
    bt2 = true;
    tx = x-e22;
    if(check())
        return true;

    maxS1 = (Ls1-1)/2;
    maxS2 = (Ls2-1)/2;
    bh1 = false;
    bt1 = true;
    bh2 = true;
    bt2 = false;
    tx = x-e12;
    if(check())
        return true;

    maxS1 = (Ls1-1)/2;
    maxS2 = (Ls2-1)/2;
    bh1 = true;
    bt1 = false;
    bh2 = false;
    bt2 = true;
    tx = x-e21;
    if(check())
        return true;

    maxS1 = (Ls1-2)/2;
    maxS2 = (Ls2-1)/2;
    bh1 = true;
    bt1 = true;
    bh2 = true;
    bt2 = false;
    tx = x-e11-e12;
    if(check())
        return true;

    maxS1 = (Ls1-1)/2;
    maxS2 = (Ls2-2)/2;
    bh1 = true;
    bt1 = false;
    bh2 = true;
    bt2 = true;
    tx = x-e22-e21;
    if(check())
        return true;

    maxS1 = (Ls1-2)/2;
    maxS2 = (Ls2-2)/2;
    bh1 = true;
    bt1 = true;
    bh2 = true;
    bt2 = true;
    tx = x-e11-e12-e21-e22;
    if(check())
        return true;
}

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(t_find())
        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;

__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 = false;
	bt1 = true;
	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;
}


#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 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=-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-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;
}

struct Tst
{
	char st_h,st_t;
	__int64 st_e11,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_e11 = p.st_e11;
		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_e11 = p.st_e11;
		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_e11 = 0;
		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_e11 = st_e11+p.st_e11;
		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=='1')
			res.st_e11++;
		else 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;
	}
	e11 = seq.st_e11;
	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;
}


#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 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=-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-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
	//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;
}

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;
	//x = ns1*xs1 + e11
	maxS1 = (Ls1-2)/2;
	bh1 = true;
	bt1 = true;
	tx = x-e11;
	if(t2_check('B'))
		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;
}

struct Tst
{
	char st_h,st_t;
	__int64 st_e11,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_e11 = p.st_e11;
		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_e11 = p.st_e11;
		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_e11 = 0;
		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_e11 = st_e11+p.st_e11;
		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=='1')
			res.st_e11++;
		else 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;
	}
	e11 = seq.st_e11;
	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;
}


#include <iostream>
#include <string>

using namespace std;

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

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

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

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 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()
{
	maxS1 = Ls1/2;
	maxS2 = Ls2/2;
	bh1 = false;
	bt1 = false;
	bh2 = false;
	bt2 = false;
	tx = x;
	if(check())
		return true;

	maxS1 = (Ls1-2)/2;
	maxS2 = Ls2/2;
	bh1 = true;
	bt1 = true;
	bh2 = false;
	bt2 = false;
	tx = x-e11;
	if(check())
		return true;

	maxS1 = Ls1/2;
	maxS2 = (Ls2-2)/2;
	bh1 = false;
	bt1 = false;
	bh2 = true;
	bt2 = true;
	tx = x-e22;
	if(check())
		return true;

	maxS1 = (Ls1-1)/2;
	maxS2 = (Ls2-1)/2;
	bh1 = false;
	bt1 = true;
	bh2 = true;
	bt2 = false;
	tx = x-e12;
	if(check())
		return true;

	maxS1 = (Ls1-1)/2;
	maxS2 = (Ls2-1)/2;
	bh1 = true;
	bt1 = false;
	bh2 = false;
	bt2 = true;
	tx = x-e21;
	if(check())
		return true;

	maxS1 = (Ls1-2)/2;
	maxS2 = (Ls2-1)/2;
	bh1 = true;
	bt1 = true;
	bh2 = true;
	bt2 = false;
	tx = x-e11-e12;
	if(check())
		return true;

	maxS1 = (Ls1-1)/2;
	maxS2 = (Ls2-2)/2;
	bh1 = true;
	bt1 = false;
	bh2 = true;
	bt2 = true;
	tx = x-e22-e21;
	if(check())
		return true;

	maxS1 = (Ls1-2)/2;
	maxS2 = (Ls2-2)/2;
	bh1 = true;
	bt1 = true;
	bh2 = true;
	bt2 = true;
	tx = x-e11-e12-e21-e22;
	if(check())
		return true;
}

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(t_find())
		cout<<s1<<endl<<s2<<endl;
	else
		cout<<"Happy new year!"<<endl;
}


#include <cstdio>
#include <algorithm>
#include <vector>
#include <string>
#include <cstring>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <iostream>
#include <cmath>

using namespace std;

int k, n, m, x;
char s1[105], s2[105];
long long fib[55];
char sym[] = "ACX";

int main()
{
    fib[1] = 1;
    for(int i = 2; i < 55; ++i)
        fib[i] = fib[i-1]+fib[i-2];

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

    for(int ix1 = 0; ix1 < 3; ++ix1)
    {
        for(int ix2 = 0; ix2 < 3; ++ix2)
        {
            for(int ix3 = 0; ix3 < 3; ++ix3)
            {
                for(int ix4 = 0; ix4 < 3; ++ix4)
                {
                    s1[0] = sym[ix1];
                    s1[n-1] = sym[ix2];
                    s2[0] = sym[ix3];
                    s2[m-1] = sym[ix4];

                    long long q = 0, x1 = x;
                    if(s1[n-1] == 'A' && s2[0] == 'C')
                        ++q;
                    if(s2[m-1] == 'A' && s1[0] == 'C')
                        q += (k-2)/2;
                    if(s2[m-1] == 'A' && s2[0] == 'C')
                        q += (k-3)/2;

                    if(q > x)
                        continue;
                    x1 -= q;

                    int l1 = n;
                    if(s1[0] != 'A') --l1;
                    if(s1[n-1] != 'C') --l1;
                    int l2 = m;
                    if(s2[0] != 'A') --l2;
                    if(s2[m-1] != 'C') --l2;

                    long long a = fib[k-2], b = fib[k-1];

                    for(int q1 = 0; q1 <= l1/2; ++q1)
                    {
                        for(int q2 = 0; q2 <= l2/2; ++q2)
                        {
                            if(a*q1 + b*q2 != x1)
                                continue;
                            int i1 = 0, qq1 = q1, qq2 = q2;
                            if(q1)
                            {
                                if(s1[0] == 'A')
                                {
                                    s1[1] = 'C';
                                    i1 = 2;
                                    --qq1;
                                }
                                else
                                    i1 = 1;
                                for(; qq1; i1 += 2, --qq1)
                                    s1[i1] = 'A', s1[i1+1] = 'C';
                            }
                            for(; i1 < n-1; ++i1)
                                s1[i1] = 'X';

                            int i2 = 0;
                            if(q2)
                            {
                                if(s2[0] == 'A')
                                {
                                    s2[1] = 'C';
                                    i2 = 2;
                                    --qq2;
                                }
                                else
                                    i2 = 1;
                                for(; qq2; i2 += 2, --qq2)
                                    s2[i2] = 'A', s2[i2+1] = 'C';
                            }
                            for(; i2 < m-1; ++i2)
                                s2[i2] = 'X';

                            printf("%s\n%s\n", s1, s2);
                            return 0;
                        }
                    }
                }
            }
        }
    }

    cout << "Happy new year!\n";

    return 0;
}


#include <cstdio>
#include <algorithm>
#include <vector>
#include <string>
#include <cstring>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <iostream>
#include <cmath>

using namespace std;

int k, n, m, x;
char s1[105], s2[105];
long long fib[55], sfib[55];
char sym[] = "ACX";

int main()
{
    fib[1] = sfib[1] = 1;
    for(int i = 2; i < 55; ++i)
    {
        fib[i] = fib[i-1]+fib[i-2];
        sfib[i] = fib[i] + sfib[i-1];
    }

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

    for(int ix1 = 0; ix1 < 3; ++ix1)
    {
        for(int ix2 = 0; ix2 < 3; ++ix2)
        {
            for(int ix3 = 0; ix3 < 3; ++ix3)
            {
                for(int ix4 = 0; ix4 < 3; ++ix4)
                {
                    s1[0] = sym[ix1];
                    s1[n-1] = sym[ix2];
                    s2[0] = sym[ix3];
                    s2[m-1] = sym[ix4];

                    long long q = 0, x1 = x;
                    if(s1[n-1] == 'A' && s2[0] == 'C')
                        q += fib[k-2];
                    if(s2[m-1] == 'A' && s1[0] == 'C')
                        for(int j = 4; j <= k; j += 2)
                            q += fib[k-j+1];
                    if(s2[m-1] == 'A' && s2[0] == 'C')
                        for(int j = 5; j <= k; j += 2)
                            q += fib[k-j+1];

                    if(q > x)
                        continue;
                    x1 -= q;

                    int l1 = n;
                    if(s1[0] != 'A') --l1;
                    if(s1[n-1] != 'C') --l1;
                    int l2 = m;
                    if(s2[0] != 'A') --l2;
                    if(s2[m-1] != 'C') --l2;

                    long long a = fib[k-2], b = fib[k-1];

                    for(int q1 = 0; q1 <= l1/2; ++q1)
                    {
                        for(int q2 = 0; q2 <= l2/2; ++q2)
                        {
                            if(a*q1 + b*q2 != x1)
                                continue;
                            int i1 = 0, qq1 = q1, qq2 = q2;
                            if(q1)
                            {
                                if(s1[0] == 'A')
                                {
                                    s1[1] = 'C';
                                    i1 = 2;
                                    --qq1;
                                }
                                else
                                    i1 = 1;
                                for(; qq1; i1 += 2, --qq1)
                                    s1[i1] = 'A', s1[i1+1] = 'C';
                            }
                            for(; i1 < n-1; ++i1)
                                s1[i1] = 'X';

                            int i2 = 0;
                            if(q2)
                            {
                                if(s2[0] == 'A')
                                {
                                    s2[1] = 'C';
                                    i2 = 2;
                                    --qq2;
                                }
                                else
                                    i2 = 1;
                                for(; qq2; i2 += 2, --qq2)
                                    s2[i2] = 'A', s2[i2+1] = 'C';
                            }
                            for(; i2 < m-1; ++i2)
                                s2[i2] = 'X';

                            printf("%s\n%s\n", s1, s2);
                            return 0;
                        }
                    }
                }
            }
        }
    }

    cout << "Happy new year!\n";

    return 0;
}

/*
7 5 1 1
*/


#pragma comment(linker, "/STACK:64000000")
#include<iostream>
#include<cstdio>
#include<cassert>
#include<cmath>
#include<cstring>
#include<ctime>
#include<cstdlib>
#include<vector>
#include<stack>
#include<queue>
#include<deque>
#include<string>
#include<map>
#include<set>
#include<sstream>
#include<algorithm>
#define forit(it,S) for(__typeof(S) it = (S).begin(); it != (S).end(); it++)
#define sz(x) (int)(x).size()
#define all(x) (x).begin(),(x).end()
#define ll long long
#define bit __builtin_popcountll
#define sqr(x) (x) * (x)
#define mp make_pair
#define pb push_back
using namespace std;
typedef pair<int, int> pii;
const double eps = 1e-9;
const double pi = acos(-1.0);
int s[55];
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;
    for (int i = 0; 2 * i <= n; i++) {
        for (int j = 0; 2 * j <= m; j++) {
            for (int li = 0; li < 2; li++) {
                for (int ri = 0; ri < 2; ri++) {
                    for (int lj = 0; lj < 2; lj++) {
                        for (int rj = 0; rj < 2; rj++) {
                            if (li + ri > n - 2 * i) continue;
                            if (lj + rj > m - 2 * j) continue;
                            int A = i; int pa = li; int sa = ri;
                            int B = j; int pb = lj; int sb = rj;
                            for (int it = 3; it <= k; it++) {
                                int C = A + B;
                                if (sa + pb == 2) {
                                    C++;
                                }
                                int pc = pa;
                                int sc = sb;
                                A = B; pa = pb; sa = sb;
                                B = C; pb = pc; sb = sc;
                                if (B > x) break;
                            }
                            if (B == x) {
                                if (li == 1) putchar('C');
                                for (int e = 0; e < i; e++) {
                                    putchar('A');
                                    putchar('C');
                                }
                                for (int e = 0; e < n - li - ri - 2 * i; e++) {
                                    putchar('B');
                                }
                                if (ri == 1) putchar('A');
                                puts("");
                                if (lj == 1) putchar('C');
                                for (int e = 0; e < j; e++) {
                                    putchar('A');
                                    putchar('C');
                                }
                                for (int e = 0; e < m - lj - rj - 2 * j; e++) {
                                    putchar('B');
                                }
                                if (rj == 1) putchar('A');
                                puts("");
                                return 0;
                            }
                        }
                    }
                }
            }
        }
    }
    puts("Happy new year!");
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <ctime>
#include <memory.h>
#include <assert.h>
#include <complex>
#include <ctime>
#include <cstdlib>
using namespace std;

#pragma comment(linker, "/STACK:100000000")

#define mp make_pair
#define pb push_back
#define sz(x) (int)(x).size()
#define ll long long
#define ull unsigned long long

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

    int k, x, n, m;
    scanf("%d %d %d %d", &k, &x, &n, &m);

    // для строк длины больше или равной двум

    for(int len1 = 0; len1 <= n; len1++) {
        for(int len2 = 0; len2 <= m; len2++) {
            for(int st1 = 0; st1 < 4; st1++) { // добавим в начале первой

                for(int fi1 = 0; fi1 < 4; fi1++) { // добавим в конце первой

                    for(int st2 = 0; st2 < 4; st2++) { // добавим в начале второй

                        for(int fi2 = 0; fi2 < 4; fi2++) { // добавим в конце второй

                            if(len1 == 0 && len2 == 0 && st1 == 3 && fi1 == 2 && st2 == 3 && fi2 == 2) {
                                len1 = len1;
                            }
                            // 0 - ничего не добавлять
                            // 1 - добавить любой
                            // 2 - добавить A
                            // 3 - добавить C

                            int l1 = len1;
                            int l2 = len2;
                            int cnt1 = len1 / 2;
                            int cnt2 = len2 / 2;
                            int first1 = 1;
                            int first2 = 1;
                            int last1 = 2;
                            int last2 = 2;
                            if(len1 == 0) first1 = 0;
                            if(len2 == 0) first2 = 0;
                            if(len1 == 0) last1 = 0;
                            if(len2 == 0) last2 = 0;
                            if(len1 % 2 == 1) last1 = 1;
                            if(len2 % 2 == 1) last2 = 1;

                            if(st1 == 1) {
                                l1++;
                                first1 = 0;
                            }
                            if(st2 == 1) {
                                l2++;
                                first2 = 0;
                            }
                            if(fi1 == 1) {
                                l1++;
                                last1 = 0;
                            }
                            if(fi2 == 1) {
                                l2++;
                                last2 = 0;
                            }

                            if(st1 == 2) {
                                l1++;
                                first1 = 1;
                            }
                            if(st2 == 2) {
                                l2++;
                                first2 = 1;
                            }
                            if(fi1 == 2) {
                                l1++;
                                last1 = 1;
                            }
                            if(fi2 == 2) {
                                l2++;
                                last2 = 1;
                            }

                            if(st1 == 3) {
                                l1++;
                                first1 = 2;
                            }
                            if(st2 == 3) {
                                l2++;
                                first2 = 2;
                            }
                            if(fi1 == 3) {
                                l1++;
                                if(last1 == 1) cnt1++;
                                last1 = 2;
                            }
                            if(fi2 == 3) {
                                l2++;
                                if(last2 == 1) cnt2++;
                                last2 = 2;
                            }
                            if(first1 == 1 && last1 == 2 && l1 == 2) cnt1 = 1;
                            if(first2 == 1 && last2 == 2 && l2 == 2) cnt2 = 1;

                            if(l1 > n || l2 > m || l1 == 0 || l2 == 0) continue;
                            int ost = 0;
                            if(last1 == 1 && first2 == 2) ost = 1;

                            for(int i = 3; i <= k; i++) {
                                int cnt3 = cnt1 + cnt2 + ost;
                                cnt1 = cnt2;
                                int first3 = first1;
                                int last3 = last2;
                                int l3 = l1 + l2;
                                last1 = last2;
                                first1 = first2;
                                l1 = l2;
                                cnt1 = cnt2;

                                last2 = last3;
                                first2 = first3;
                                l2 = l3;
                                cnt2 = cnt3;

                                ost = 0;
                                if(last1 == 1 && first2 == 2) ost = 1;

                                if(cnt2 > x) break;
                            }

                            if(cnt2 == x) {
                                // вывести строки
                                if(st1 == 1) cout << "D";
                                if(st1 == 2) cout << "A";
                                if(st1 == 3) cout << "C";
                                for(int i = 0; i < len1; i++) {
                                    if(i % 2 == 0) cout << "A";
                                    else cout << "C";
                                }
                                if(fi1 == 1) cout << "D";
                                if(fi1 == 2) cout << "A";
                                if(fi1 == 3) cout << "C";
                                cout << endl;

                                if(st2 == 1) cout << "D";
                                if(st2 == 2) cout << "A";
                                if(st2 == 3) cout << "C";
                                for(int i = 0; i < len2; i++) {
                                    if(i % 2 == 0) cout << "A";
                                    else cout << "C";
                                }
                                if(fi2 == 1) cout << "D";
                                if(fi2 == 2) cout << "A";
                                if(fi2 == 3) cout << "C";
                                cout << endl;
                                return 0;
                            }
                        }
                    }
                }
            }
        }
    }
    printf("Happy new year!");
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <ctime>
#include <memory.h>
#include <assert.h>
#include <complex>
#include <ctime>
#include <cstdlib>
using namespace std;

#pragma comment(linker, "/STACK:100000000")

#define mp make_pair
#define pb push_back
#define sz(x) (int)(x).size()
#define ll long long
#define ull unsigned long long

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

    int k, x, n, m;
    scanf("%d %d %d %d", &k, &x, &n, &m);

    // для строк длины больше или равной двум

    for(int len1 = 0; len1 <= n; len1++) {
        for(int len2 = 0; len2 <= m; len2++) {
            for(int st1 = 0; st1 < 4; st1++) { // добавим в начале первой

                for(int fi1 = 0; fi1 < 4; fi1++) { // добавим в конце первой

                    for(int st2 = 0; st2 < 4; st2++) { // добавим в начале второй

                        for(int fi2 = 0; fi2 < 4; fi2++) { // добавим в конце второй

                            if(len1 == 0 && len2 == 0 && st1 == 3 && fi1 == 2 && st2 == 3 && fi2 == 2) {
                                len1 = len1;
                            }
                            // 0 - ничего не добавлять
                            // 1 - добавить любой
                            // 2 - добавить A
                            // 3 - добавить C

                            int l1 = len1;
                            int l2 = len2;
                            int cnt1 = len1 / 2;
                            int cnt2 = len2 / 2;
                            int first1 = 1;
                            int first2 = 1;
                            int last1 = 2;
                            int last2 = 2;
                            if(len1 == 0) first1 = 0;
                            if(len2 == 0) first2 = 0;
                            if(len1 == 0) last1 = 0;
                            if(len2 == 0) last2 = 0;
                            if(len1 % 2 == 1) last1 = 1;
                            if(len2 % 2 == 1) last2 = 1;

                            if(st1 == 1) {
                                l1++;
                                first1 = 0;
                            }
                            if(st2 == 1) {
                                l2++;
                                first2 = 0;
                            }
                            if(fi1 == 1) {
                                l1++;
                                last1 = 0;
                            }
                            if(fi2 == 1) {
                                l2++;
                                last2 = 0;
                            }

                            if(st1 == 2) {
                                l1++;
                                first1 = 1;
                            }
                            if(st2 == 2) {
                                l2++;
                                first2 = 1;
                            }
                            if(fi1 == 2) {
                                l1++;
                                last1 = 1;
                            }
                            if(fi2 == 2) {
                                l2++;
                                last2 = 1;
                            }

                            if(st1 == 3) {
                                l1++;
                                first1 = 2;
                            }
                            if(st2 == 3) {
                                l2++;
                                first2 = 2;
                            }
                            if(fi1 == 3) {
                                l1++;
                                if(last1 == 1) cnt1++;
                                last1 = 2;
                            }
                            if(fi2 == 3) {
                                l2++;
                                if(last2 == 1) cnt2++;
                                last2 = 2;
                            }
                            if(first1 == 1 && last1 == 2 && n == 2) cnt1 = 1;
                            if(first2 == 1 && last2 == 2 && m == 2) cnt2 = 1;

                            if(l1 > n || l2 > m || l1 == 0 || l2 == 0) continue;
                            int ost = 0;
                            if(last1 == 1 && first2 == 2) ost = 1;

                            for(int i = 3; i <= k; i++) {
                                int cnt3 = cnt1 + cnt2 + ost;
                                cnt1 = cnt2;
                                int first3 = first1;
                                int last3 = last2;
                                int l3 = l1 + l2;
                                last1 = last2;
                                first1 = first2;
                                l1 = l2;
                                cnt1 = cnt2;

                                last2 = last3;
                                first2 = first3;
                                l2 = l3;
                                cnt2 = cnt3;

                                ost = 0;
                                if(last1 == 1 && first2 == 2) ost = 1;

                                if(cnt2 > x) break;
                            }

                            if(cnt2 == x) {
                                // вывести строки
                                if(st1 == 1) cout << "D";
                                if(st1 == 2) cout << "A";
                                if(st1 == 3) cout << "C";
                                int need = n - len1 - (st1 > 0) - (fi1 > 0);
                                for(int i = 0; i < need; i++) cout << "X";
                                for(int i = 0; i < len1; i++) {
                                    if(i % 2 == 0) cout << "A";
                                    else cout << "C";
                                }
                                if(fi1 == 1) cout << "D";
                                if(fi1 == 2) cout << "A";
                                if(fi1 == 3) cout << "C";
                                cout << endl;

                                if(st2 == 1) cout << "D";
                                if(st2 == 2) cout << "A";
                                if(st2 == 3) cout << "C";
                                need = m - len2 - (st2 > 0) - (fi2 > 0);
                                for(int i = 0; i < need; i++) cout << "X";
                                for(int i = 0; i < len2; i++) {
                                    if(i % 2 == 0) cout << "A";
                                    else cout << "C";
                                }
                                if(fi2 == 1) cout << "D";
                                if(fi2 == 2) cout << "A";
                                if(fi2 == 3) cout << "C";
                                cout << endl;
                                return 0;
                            }
                        }
                    }
                }
            }
        }
    }
    printf("Happy new year!");
    return 0;
}


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

int k, x, n, m;
long long num[100];
long long two[100], twone[100];
char a[104];
char b[104];
long long cnt[10];

int main()
{
    scanf("%d%d%d%d", &k, &x, &n, &m);

    num[1] = 1;
    num[2] = 1;
    for(int i = 3; i <= k; i++)
        num[i] = num[i-2] + num[i-1];

    twone[4] = 1;
    for(int i = 5; i <= k; i++)
    {
        two[i] = two[i-1] + two[i-2] + (i % 2);
        twone[i] = twone[i-1] + twone[i-2] + (i % 2 == 0);
    }
    cnt[0] = num[k-2]; // 1
    cnt[1] = num[k-1]; // 2
    cnt[2] = two[k]; // 22
    cnt[3] = num[k-2]; // 12
    cnt[4] = twone[k]; // 21

    for(int i = 0; i <= n/2; i++)
    {
        for(int j = 0; j <= m/2; j++)
        {
            for(int c1 = 0; c1 <= 1; c1++)
            {
                for(int c2 = 0; c2 <= 1; c2++)
                {
                    for(int c3 = 0; c3 <= 1; c3++)
                    {
                        long long sum = cnt[0] * i + cnt[1] * j + c1 * cnt[2] + c2 * cnt[3] + c3 * cnt[4];
                        if(sum == x)
                        {
                            memset(a, 0, sizeof(a));
                            memset(b, 0, sizeof(b));
                            if(c1 > 0)
                            {
                                if(m < 2)
                                    continue;
                                b[0] = 'C';
                                b[m-1] = 'A';
                            }
                            if(c2 > 0)
                            {
                                if((a[n-1] != 'A' && a[n-1] != 0) || (b[0] != 'C' && b[0] != 0))
                                    continue;
                                a[n-1] = 'A';
                                b[0] = 'C';
                            }
                            if(c3 > 0)
                            {
                                if((a[0] != 'C' && a[0] != 0) || (b[m-1] != 'A' && b[m-1] != 0))
                                    continue;
                                b[m-1] = 'A';
                                a[0] = 'C';
                            }
                            bool bad = 0;
                            for(int t = (a[0] == 0 ? 0 : 1), cn = 0; cn < i; cn++, t += 2)
                            {
                                if(t + 1 >= n || a[t] || a[t+1])
                                    bad = 1;
                                a[t] = 'A';
                                a[t+1] = 'C';
                            }
                            for(int t = (b[0] == 0 ? 0 : 1), cn = 0; cn < j; cn++, t += 2)
                            {
                                if(t + 1 >= m || b[t] || b[t+1])
                                    bad = 1;
                                b[t] = 'A';
                                b[t+1] = 'C';
                            }
                            for(int t = 0; t < n; t++)
                                if(!a[t])
                                    a[t] = 'B';
                            for(int t = 0; t < m; t++)
                                if(!b[t])
                                    b[t] = 'B';
                            a[n] = 0;
                            b[m] = 0;
                            if(!bad)
                            {
                                printf("%s\n", a);
                                printf("%s\n", b);
                                return 0;
                            }
                        }
                    }
                }
            }
        }
    }

    printf("Happy new year!\n");

    return 0;
}


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

int k, x, n, m;
long long num[100];
long long two[100], twone[100];
char a[104];
char b[104];
long long cnt[10];

int main()
{
    scanf("%d%d%d%d", &k, &x, &n, &m);

    num[1] = 1;
    num[2] = 1;
    for(int i = 3; i <= k; i++)
        num[i] = num[i-2] + num[i-1];

    twone[4] = 1;
    for(int i = 5; i <= k; i++)
    {
        two[i] = two[i-1] + two[i-2] + (i % 2);
        twone[i] = twone[i-1] + twone[i-2] + (i % 2 == 0);
    }
    cnt[0] = num[k-2]; // 1
    cnt[1] = num[k-1]; // 2
    cnt[2] = two[k]; // 22
    cnt[3] = num[k-2]; // 12
    cnt[4] = twone[k]; // 21

    for(int i = 0; i <= n/2; i++)
    {
        for(int j = 0; j <= m/2; j++)
        {
            for(int c1 = 0; c1 <= 1; c1++)
            {
                for(int c2 = 0; c2 <= 1; c2++)
                {
                    for(int c3 = 0; c3 <= 1; c3++)
                    {
                        long long sum = cnt[0] * i + cnt[1] * j + c1 * cnt[2] + c2 * cnt[3] + c3 * cnt[4];
                        if(sum == x)
                        {
                            memset(a, 0, sizeof(a));
                            memset(b, 0, sizeof(b));
                            if(c1 > 0)
                            {
                                if(m < 2)
                                    continue;
                                b[0] = 'C';
                                b[m-1] = 'A';
                            }
                            if(c2 > 0)
                            {
                                if((a[n-1] != 'A' && a[n-1] != 0) || (b[0] != 'C' && b[0] != 0))
                                    continue;
                                a[n-1] = 'A';
                                b[0] = 'C';
                            }
                            if(c3 > 0)
                            {
                                if((a[0] != 'C' && a[0] != 0) || (b[m-1] != 'A' && b[m-1] != 0))
                                    continue;
                                b[m-1] = 'A';
                                a[0] = 'C';
                            }
                            bool bad = 0;
                            for(int t = (a[0] == 0 ? 0 : 1), cn = 0; cn < i; cn++, t += 2)
                            {
                                if(t + 1 >= n || a[t] || a[t+1])
                                    bad = 1;
                                a[t] = 'A';
                                a[t+1] = 'C';
                            }
                            for(int t = (b[0] == 0 ? 0 : 1), cn = 0; cn < j; cn++, t += 2)
                            {
                                if(t + 1 >= m || b[t] || b[t+1])
                                    bad = 1;
                                b[t] = 'A';
                                b[t+1] = 'C';
                            }
                            for(int t = 0; t < n; t++)
                                if(!a[t])
                                    a[t] = 'B';
                            for(int t = 0; t < m; t++)
                                if(!b[t])
                                    b[t] = 'B';
                            a[n] = 0;
                            b[m] = 0;

                            if(c2 > 0 && c3 > 0 && c1 == 0)
                                bad = 1;
                            if(!bad)
                            {
                                printf("%s\n", a);
                                printf("%s\n", b);
                                return 0;
                            }
                        }
                    }
                }
            }
        }
    }

    printf("Happy new year!\n");

    return 0;
}


#pragma comment(linker, "/STACK:36777216")
//#pragma GCC optimize ("O2")
/**
 *    This code has been written by YueGuang, feel free to ask me question. Blog: http://www.moonl1ght.xyz
 *    created:
 */
#define LOCAL
#include <functional>
#include <algorithm>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <numeric>
#include <cstring>
#include <climits>
#include <cassert>
#include <complex>
#include <cstdio>
#include <string>
#include <vector>
#include <bitset>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <list>
#include <set>
#include <map>

//#include <tr1/unordered_set>
//#include <tr1/unordered_map>
//#include <array>

using namespace std;

#define REP(i, n) for (int i=0;i<n;++i)
#define FOR(i, a, b) for (int i=a;i<b;++i)
#define DWN(i, b, a) for (int i=b-1;i>=a;--i)
#define REP_1(i, n) for (int i=1;i<=n;++i)
#define FOR_1(i, a, b) for (int i=a;i<=b;++i)
#define DWN_1(i, b, a) for (int i=b;i>=a;--i)
#define REP_C(i, n) for (int n____=n,i=0;i<n____;++i)
#define FOR_C(i, a, b) for (int b____=b,i=a;i<b____;++i)
#define DWN_C(i, b, a) for (int a____=a,i=b-1;i>=a____;--i)
#define REP_N(i, n) for (i=0;i<n;++i)
#define FOR_N(i, a, b) for (i=a;i<b;++i)
#define DWN_N(i, b, a) for (i=b-1;i>=a;--i)
#define REP_1_C(i, n) for (int n____=n,i=1;i<=n____;++i)
#define FOR_1_C(i, a, b) for (int b____=b,i=a;i<=b____;++i)
#define DWN_1_C(i, b, a) for (int a____=a,i=b;i>=a____;--i)
#define REP_1_N(i, n) for (i=1;i<=n;++i)
#define FOR_1_N(i, a, b) for (i=a;i<=b;++i)
#define DWN_1_N(i, b, a) for (i=b;i>=a;--i)
#define REP_C_N(i, n) for (int n____=(i=0,n);i<n____;++i)
#define FOR_C_N(i, a, b) for (int b____=(i=0,b);i<b____;++i)
#define DWN_C_N(i, b, a) for (int a____=(i=b-1,a);i>=a____;--i)
#define REP_1_C_N(i, n) for (int n____=(i=1,n);i<=n____;++i)
#define FOR_1_C_N(i, a, b) for (int b____=(i=a,b);i<=b____;++i)
#define DWN_1_C_N(i, b, a) for (int a____=(i=b,a);i>=a____;--i)

#define ECH(it, A) for (__typeof((A).begin()) it=(A).begin(); it != (A).end(); ++it)
#define rECH(it, A) for (__typeof((A).rbegin()) it=(A).rbegin(); it != (A).rend(); ++it)
#define REP_S(i, str) for (char*i=str;*i;++i)
#define REP_L(i, hd, suc) for (int i=hd;i;i=suc[i])
#define REP_G(i, u) REP_L(i,hd[u],suc)
#define REP_SS(x, s) for (int x=s;x;x=(x-1)&s)
#define DO(n) for ( int ____n = n; ____n-->0; )
#define REP_2(i, j, n, m) REP(i, n) REP(j, m)
#define REP_2_1(i, j, n, m) REP_1(i, n) REP_1(j, m)
#define REP_3(i, j, k, n, m, l) REP(i, n) REP(j, m) REP(k, l)
#define REP_3_1(i, j, k, n, m, l) REP_1(i, n) REP_1(j, m) REP_1(k, l)
#define REP_4(i, j, k, ii, n, m, l, nn) REP(i, n) REP(j, m) REP(k, l) REP(ii, nn)
#define REP_4_1(i, j, k, ii, n, m, l, nn) REP_1(i, n) REP_1(j, m) REP_1(k, l) REP_1(ii, nn)

#define ALL(A) A.begin(), A.end()
#define LLA(A) A.rbegin(), A.rend()
#define CPY(A, B) memcpy(A, B, sizeof(A))
#define INS(A, P, B) A.insert(A.begin() + P, B)
#define ERS(A, P) A.erase(A.begin() + P)
#define LBD(A, x) (lower_bound(ALL(A), x) - A.begin())
#define UBD(A, x) (upper_bound(ALL(A), x) - A.begin())
#define CTN(T, x) (T.find(x) != T.end())
#define SZ(A) int((A).size())
#define PB push_back
#define MP(A, B) make_pair(A, B)
#define PTT pair<T, T>
#define Ts *this
#define rTs return Ts
#define fi first
#define se second
#define re real()
#define im imag()

#define Rush for(int ____T=RD(); ____T--;)
#define Display(A, n, m) {                      \
REP(i, n){                                    \
REP(j, m-1) cout << A[i][j] << " ";     \
cout << A[i][m-1] << endl;                \
}                                            \
}
#define Display_1(A, n, m) {                    \
REP_1(i, n){                                \
REP_1(j, m-1) cout << A[i][j] << " ";   \
cout << A[i][m] << endl;                \
}                                            \
}

typedef long long LL;
//typedef long double DB;
typedef double DB;
typedef unsigned uint;
typedef unsigned long long uLL;

typedef vector<int> VI;
typedef vector<char> VC;
typedef vector<string> VS;
typedef vector<LL> VL;
typedef vector<DB> VF;
typedef set<int> SI;
typedef set<string> SS;
typedef map<int, int> MII;
typedef map<string, int> MSI;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef vector<PII> VII;
typedef vector<VI> VVI;
typedef vector<VII> VVII;

template<class T> inline T& RD(T &);
template<class T> inline void OT(const T &);
//inline int RD(){int x; return RD(x);}
inline LL RD(){LL x; return RD(x);}
inline DB& RF(DB &);
inline DB RF(){DB x; return RF(x);}
inline char* RS(char *s);
inline char& RC(char &c);
inline char RC();
inline char& RC(char &c){scanf(" %c", &c); return c;}
inline char RC(){char c; return RC(c);}
//inline char& RC(char &c){c = getchar(); return c;}
//inline char RC(){return getchar();}

template<class T> inline T& RDD(T &);
inline LL RDD(){LL x; return RDD(x);}

template<class T0, class T1> inline T0& RD(T0 &x0, T1 &x1){RD(x0), RD(x1); return x0;}
template<class T0, class T1, class T2> inline T0& RD(T0 &x0, T1 &x1, T2 &x2){RD(x0), RD(x1), RD(x2); return x0;}
template<class T0, class T1, class T2, class T3> inline T0& RD(T0 &x0, T1 &x1, T2 &x2, T3 &x3){RD(x0), RD(x1), RD(x2), RD(x3); return x0;}
template<class T0, class T1, class T2, class T3, class T4> inline T0& RD(T0 &x0, T1 &x1, T2 &x2, T3 &x3, T4 &x4){RD(x0), RD(x1), RD(x2), RD(x3), RD(x4); return x0;}
template<class T0, class T1, class T2, class T3, class T4, class T5> inline T0& RD(T0 &x0, T1 &x1, T2 &x2, T3 &x3, T4 &x4, T5 &x5){RD(x0), RD(x1), RD(x2), RD(x3), RD(x4), RD(x5); return x0;}
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6> inline T0& RD(T0 &x0, T1 &x1, T2 &x2, T3 &x3, T4 &x4, T5 &x5, T6 &x6){RD(x0), RD(x1), RD(x2), RD(x3), RD(x4), RD(x5), RD(x6); return x0;}
template<class T0, class T1> inline void OT(const T0 &x0, const T1 &x1){OT(x0), OT(x1);}
template<class T0, class T1, class T2> inline void OT(const T0 &x0, const T1 &x1, const T2 &x2){OT(x0), OT(x1), OT(x2);}
template<class T0, class T1, class T2, class T3> inline void OT(const T0 &x0, const T1 &x1, const T2 &x2, const T3 &x3){OT(x0), OT(x1), OT(x2), OT(x3);}
template<class T0, class T1, class T2, class T3, class T4> inline void OT(const T0 &x0, const T1 &x1, const T2 &x2, const T3 &x3, const T4 &x4){OT(x0), OT(x1), OT(x2), OT(x3), OT(x4);}
template<class T0, class T1, class T2, class T3, class T4, class T5> inline void OT(const T0 &x0, const T1 &x1, const T2 &x2, const T3 &x3, const T4 &x4, const T5 &x5){OT(x0), OT(x1), OT(x2), OT(x3), OT(x4), OT(x5);}
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6> inline void OT(const T0 &x0, const T1 &x1, const T2 &x2, const T3 &x3, const T4 &x4, const T5 &x5, const T6 &x6){OT(x0), OT(x1), OT(x2), OT(x3), OT(x4), OT(x5), OT(x6);}
inline char& RC(char &a, char &b){RC(a), RC(b); return a;}
inline char& RC(char &a, char &b, char &c){RC(a), RC(b), RC(c); return a;}
inline char& RC(char &a, char &b, char &c, char &d){RC(a), RC(b), RC(c), RC(d); return a;}
inline char& RC(char &a, char &b, char &c, char &d, char &e){RC(a), RC(b), RC(c), RC(d), RC(e); return a;}
inline char& RC(char &a, char &b, char &c, char &d, char &e, char &f){RC(a), RC(b), RC(c), RC(d), RC(e), RC(f); return a;}
inline char& RC(char &a, char &b, char &c, char &d, char &e, char &f, char &g){RC(a), RC(b), RC(c), RC(d), RC(e), RC(f), RC(g); return a;}
inline DB& RF(DB &a, DB &b){RF(a), RF(b); return a;}
inline DB& RF(DB &a, DB &b, DB &c){RF(a), RF(b), RF(c); return a;}
inline DB& RF(DB &a, DB &b, DB &c, DB &d){RF(a), RF(b), RF(c), RF(d); return a;}
inline DB& RF(DB &a, DB &b, DB &c, DB &d, DB &e){RF(a), RF(b), RF(c), RF(d), RF(e); return a;}
inline DB& RF(DB &a, DB &b, DB &c, DB &d, DB &e, DB &f){RF(a), RF(b), RF(c), RF(d), RF(e), RF(f); return a;}
inline DB& RF(DB &a, DB &b, DB &c, DB &d, DB &e, DB &f, DB &g){RF(a), RF(b), RF(c), RF(d), RF(e), RF(f), RF(g); return a;}
inline void RS(char *s1, char *s2){RS(s1), RS(s2);}
inline void RS(char *s1, char *s2, char *s3){RS(s1), RS(s2), RS(s3);}
template<class T0,class T1>inline T0& RDD(T0&a, T1&b){RDD(a),RDD(b); return a;}
template<class T0,class T1,class T2>inline T1& RDD(T0&a, T1&b, T2&c){RDD(a),RDD(b),RDD(c); return a;}

template<class T> inline void RST(T &A){memset(A, 0, sizeof(A));}
template<class T> inline void FLC(T &A, int x){memset(A, x, sizeof(A));}
template<class T> inline void CLR(T &A){A.clear();}

template<class T0, class T1> inline void RST(T0 &A0, T1 &A1){RST(A0), RST(A1);}
template<class T0, class T1, class T2> inline void RST(T0 &A0, T1 &A1, T2 &A2){RST(A0), RST(A1), RST(A2);}
template<class T0, class T1, class T2, class T3> inline void RST(T0 &A0, T1 &A1, T2 &A2, T3 &A3){RST(A0), RST(A1), RST(A2), RST(A3);}
template<class T0, class T1, class T2, class T3, class T4> inline void RST(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4){RST(A0), RST(A1), RST(A2), RST(A3), RST(A4);}
template<class T0, class T1, class T2, class T3, class T4, class T5> inline void RST(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, T5 &A5){RST(A0), RST(A1), RST(A2), RST(A3), RST(A4), RST(A5);}
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6> inline void RST(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, T5 &A5, T6 &A6){RST(A0), RST(A1), RST(A2), RST(A3), RST(A4), RST(A5), RST(A6);}
template<class T0, class T1> inline void FLC(T0 &A0, T1 &A1, int x){FLC(A0, x), FLC(A1, x);}
template<class T0, class T1, class T2> inline void FLC(T0 &A0, T1 &A1, T2 &A2, int x){FLC(A0, x), FLC(A1, x), FLC(A2, x);}
template<class T0, class T1, class T2, class T3> inline void FLC(T0 &A0, T1 &A1, T2 &A2, T3 &A3, int x){FLC(A0, x), FLC(A1, x), FLC(A2, x), FLC(A3, x);}
template<class T0, class T1, class T2, class T3, class T4> inline void FLC(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, int x){FLC(A0, x), FLC(A1, x), FLC(A2, x), FLC(A3, x), FLC(A4, x);}
template<class T0, class T1, class T2, class T3, class T4, class T5> inline void FLC(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, T5 &A5, int x){FLC(A0, x), FLC(A1, x), FLC(A2, x), FLC(A3, x), FLC(A4, x), FLC(A5, x);}
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6> inline void FLC(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, T5 &A5, T6 &A6, int x){FLC(A0, x), FLC(A1, x), FLC(A2, x), FLC(A3, x), FLC(A4, x), FLC(A5, x), FLC(A6, x);}
template<class T> inline void CLR(priority_queue<T, vector<T>, less<T> > &Q){while (!Q.empty()) Q.pop();}
template<class T> inline void CLR(priority_queue<T, vector<T>, greater<T> > &Q){while (!Q.empty()) Q.pop();}
template<class T> inline void CLR(stack<T> &S){while (!S.empty()) S.pop();}
template<class T> inline void CLR(queue<T> &Q){while (!Q.empty()) Q.pop();}

template<class T0, class T1> inline void CLR(T0 &A0, T1 &A1){CLR(A0), CLR(A1);}
template<class T0, class T1, class T2> inline void CLR(T0 &A0, T1 &A1, T2 &A2){CLR(A0), CLR(A1), CLR(A2);}
template<class T0, class T1, class T2, class T3> inline void CLR(T0 &A0, T1 &A1, T2 &A2, T3 &A3){CLR(A0), CLR(A1), CLR(A2), CLR(A3);}
template<class T0, class T1, class T2, class T3, class T4> inline void CLR(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4){CLR(A0), CLR(A1), CLR(A2), CLR(A3), CLR(A4);}
template<class T0, class T1, class T2, class T3, class T4, class T5> inline void CLR(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, T5 &A5){CLR(A0), CLR(A1), CLR(A2), CLR(A3), CLR(A4), CLR(A5);}
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6> inline void CLR(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, T5 &A5, T6 &A6){CLR(A0), CLR(A1), CLR(A2), CLR(A3), CLR(A4), CLR(A5), CLR(A6);}
template<class T> inline void CLR(T &A, int n){REP(i, n) CLR(A[i]);}

template<class T> inline bool EPT(T &a){return a.empty();}
template<class T> inline T& SRT(T &A){sort(ALL(A)); return A;}
template<class T, class C> inline T& SRT(T &A, C cmp){sort(ALL(A), cmp); return A;}
template<class T> inline T& RVS(T &A){reverse(ALL(A)); return A;}
template<class T> inline T& UNQQ(T &A){A.resize(unique(ALL(A))-A.begin());return A;}
template<class T> inline T& UNQ(T &A){SRT(A);return UNQQ(A);}
template<class T, class C> inline T& UNQ(T &A, C cmp){SRT(A, cmp);return UNQQ(A);}

//}

/** Constant List .. **/ //{

const int MOD = int(1e9) + 7;
const int INF = 0x3f3f3f3f;
const LL INFF = 0x3f3f3f3f3f3f3f3fLL;
const DB EPS = 1e-9;
const DB OO = 1e20;
const DB PI = acos(-1.0); //M_PI;

const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};

//}

/** Add On .. **/ //{
// <<= '0. Nichi Joo ., //{

template<class T> inline bool checkMin(T &a,const T b){return b < a ? a = b, 1 : 0;}
template<class T> inline bool checkMax(T &a,const T b){return a < b ? a = b, 1 : 0;}
template <class T, class C> inline bool checkUpd(T& a, const T b, C c){return c(b,a) ? a = b, 1 : 0;}
template<class T> inline T min(T a, T b, T c){return min(min(a, b), c);}
template<class T> inline T max(T a, T b, T c){return max(max(a, b), c);}
template<class T> inline T min(T a, T b, T c, T d){return min(min(a, b), min(c, d));}
template<class T> inline T max(T a, T b, T c, T d){return max(max(a, b), max(c, d));}
template<class T> inline T min(T a, T b, T c, T d, T e){return min(min(min(a,b),min(c,d)),e);}
template<class T> inline T max(T a, T b, T c, T d, T e){return max(max(max(a,b),max(c,d)),e);}
template<class T> inline T sqr(T a){return a*a;}
template<class T> inline T cub(T a){return a*a*a;}
template<class T> inline T ceil(T x, T y){return (x - 1) / y + 1;}
template<class T> T abs(T x){return x>0?x:-x;}
inline int sgn(DB x){return x < -EPS ? -1 : x > EPS;}
inline int sgn(DB x, DB y){return sgn(x - y);}

inline DB cos(DB a, DB b, DB c){return (sqr(a)+sqr(b)-sqr(c))/(2*a*b);}
inline DB cot(DB x){return 1./tan(x);};
inline DB sec(DB x){return 1./cos(x);};
inline DB csc(DB x){return 1./sin(x);};

//}
// <<= '1. Bitwise Operation ., //{
namespace BO{

    inline bool _1(int x, int i){return bool(x&1<<i);}
    inline bool _1(LL x, int i){return bool(x&1LL<<i);}
    inline LL _1(int i){return 1LL<<i;}
    inline LL _U(int i){return _1(i) - 1;};

    inline int reverse_bits(int x){
        x = ((x >> 1) & 0x55555555) | ((x << 1) & 0xaaaaaaaa);
        x = ((x >> 2) & 0x33333333) | ((x << 2) & 0xcccccccc);
        x = ((x >> 4) & 0x0f0f0f0f) | ((x << 4) & 0xf0f0f0f0);
        x = ((x >> 8) & 0x00ff00ff) | ((x << 8) & 0xff00ff00);
        x = ((x >>16) & 0x0000ffff) | ((x <<16) & 0xffff0000);
        return x;
    }

    inline LL reverse_bits(LL x){
        x = ((x >> 1) & 0x5555555555555555LL) | ((x << 1) & 0xaaaaaaaaaaaaaaaaLL);
        x = ((x >> 2) & 0x3333333333333333LL) | ((x << 2) & 0xccccccccccccccccLL);
        x = ((x >> 4) & 0x0f0f0f0f0f0f0f0fLL) | ((x << 4) & 0xf0f0f0f0f0f0f0f0LL);
        x = ((x >> 8) & 0x00ff00ff00ff00ffLL) | ((x << 8) & 0xff00ff00ff00ff00LL);
        x = ((x >>16) & 0x0000ffff0000ffffLL) | ((x <<16) & 0xffff0000ffff0000LL);
        x = ((x >>32) & 0x00000000ffffffffLL) | ((x <<32) & 0xffffffff00000000LL);
        return x;
    }

    template<class T> inline bool odd(T x){return x&1;}
    template<class T> inline bool even(T x){return !odd(x);}
    template<class T> inline T low_bit(T x) {return x & -x;}
    template<class T> inline T high_bit(T x) {T p = low_bit(x);while (p != x) x -= p, p = low_bit(x);return p;}
    template<class T> inline T cover_bit(T x){T p = 1; while (p < x) p <<= 1;return p;}
    template<class T> inline int cover_idx(T x){int p = 0; while (_1(p) < x ) ++p; return p;}

    inline int clz(int x){return __builtin_clz(x);}
    inline int clz(LL x){return __builtin_clzll(x);}
    inline int ctz(int x){return __builtin_ctz(x);}
    inline int ctz(LL x){return __builtin_ctzll(x);}
    inline int lg2(int x){return !x ? -1 : 31 - clz(x);}
    inline int lg2(LL x){return !x ? -1 : 63 - clz(x);}
    inline int low_idx(int x){return !x ? -1 : ctz(x);}
    inline int low_idx(LL x){return !x ? -1 : ctz(x);}
    inline int high_idx(int x){return lg2(x);}
    inline int high_idx(LL x){return lg2(x);}
    inline int parity(int x){return __builtin_parity(x);}
    inline int parity(LL x){return __builtin_parityll(x);}
    inline int count_bits(int x){return __builtin_popcount(x);}
    inline int count_bits(LL x){return __builtin_popcountll(x);}

} using namespace BO;//}

// <<= '2. Number Theory .,//{
namespace NT{
#define gcd __gcd
    inline LL lcm(LL a, LL b){return a*b/gcd(a,b);}

    inline void INC(int &a, int b){a += b; if (a >= MOD) a -= MOD;}
    inline int sum(int a, int b){a += b; if (a >= MOD) a -= MOD; return a;}

    /* 模数两倍刚好超 int 时。
     inline int sum(uint a, int b){a += b; a %= MOD;if (a < 0) a += MOD; return a;}
     inline void INC(int &a, int b){a = sum(a, b);}
     */

    inline void DEC(int &a, int b){a -= b; if (a < 0) a += MOD;}
    inline int dff(int a, int b){a -= b; if (a < 0) a  += MOD; return a;}
    inline void MUL(int &a, int b){a = (LL)a * b % MOD;}
    //inline int pdt(int a, int b){return (LL)a * b % MOD;}
    inline int pdt(int x,int y) {
        int ret; __asm__ __volatile__ ("\tmull %ebx\n\tdivl %ecx\n":"=d"(ret):"a"(x),"b"(y),"c"(MOD));
        return ret;
    }

    inline int gcd(int m, int n, int &x, int &y){

        x = 1, y = 0; int xx = 0, yy = 1, q;

        while (1){
            q = m / n, m %= n;
            if (!m){x = xx, y = yy; return n;}
            DEC(x, pdt(q, xx)), DEC(y, pdt(q, yy));
            q = n / m, n %= m;
            if (!n) return m;
            DEC(xx, pdt(q, x)), DEC(yy, pdt(q, y));
        }
    }

    inline int sum(int a, int b, int c){return sum(a, sum(b, c));}
    inline int sum(int a, int b, int c, int d){return sum(sum(a, b), sum(c, d));}
    inline int pdt(int a, int b, int c){return pdt(a, pdt(b, c));}
    inline int pdt(int a, int b, int c, int d){return pdt(pdt(a, b), pdt(c, d));}

    inline int pow(int a, LL b){
        int c(1); while (b){
            if (b&1) MUL(c, a);
            MUL(a, a), b >>= 1;
        }
        return c;
    }

    template<class T> inline T pow(T a, LL b){
        T c(1); while (b){
            if (b&1) c *= a;
            a *= a, b >>= 1;
        }
        return c;
    }

    template<class T> inline T pow(T a, int b){
        return pow(a, (LL)b);
    }

    inline int _I(int b){
        int a = MOD, x1 = 0, x2 = 1, q; while (1){
            q = a / b, a %= b;
            if (!a) return x2;
            DEC(x1, pdt(q, x2));

            q = b / a, b %= a;
            if (!b) return x1;
            DEC(x2, pdt(q, x1));
        }
    }

    inline void DIV(int &a, int b){MUL(a, _I(b));}
    inline int qtt(int a, int b){return pdt(a, _I(b));}

    struct Int{
        int val;

        operator int() const{return val;}

        Int(int _val = 0):val(_val){
            val %= MOD; if (val < 0) val += MOD;
        }
        Int(LL _val):val(_val){
            _val %= MOD; if (_val < 0) _val += MOD;
            val = _val;
        }

        Int& operator +=(const int& rhs){INC(val, rhs);rTs;}
        Int operator +(const int& rhs) const{return sum(val, rhs);}
        Int& operator -=(const int& rhs){DEC(val, rhs);rTs;}
        Int operator -(const int& rhs) const{return dff(val, rhs);}
        Int& operator *=(const int& rhs){MUL(val, rhs);rTs;}
        Int operator *(const int& rhs) const{return pdt(val, rhs);}
        Int& operator /=(const int& rhs){DIV(val, rhs);rTs;}
        Int operator /(const int& rhs) const{return qtt(val, rhs);}
        Int operator-()const{return MOD-*this;}
    };

} using namespace NT;//}

//}

/** I/O Accelerator Interface .. **/ //{
#define g (c=getchar())
#define d isdigit(g)
#define p x=x*10+c-'0'
#define n x=x*10+'0'-c
#define pp l/=10,p
#define nn l/=10,n
template<class T> inline T& RD(T &x){
    char c;while(!d);x=c-'0';while(d)p;
    return x;
}
template<class T> inline T& RDD(T &x){
    char c;while(g,c!='-'&&!isdigit(c));
    if (c=='-'){x='0'-g;while(d)n;}
    else{x=c-'0';while(d)p;}
    return x;
}
inline DB& RF(DB &x){
    //scanf("%lf", &x);
    char c;while(g,c!='-'&&c!='.'&&!isdigit(c));
    if(c=='-')if(g=='.'){x=0;DB l=1;while(d)nn;x*=l;}
    else{x='0'-c;while(d)n;if(c=='.'){DB l=1;while(d)nn;x*=l;}}
    else if(c=='.'){x=0;DB l=1;while(d)pp;x*=l;}
    else{x=c-'0';while(d)p;if(c=='.'){DB l=1;while(d)pp;x*=l;}}
    return x;
}
#undef nn
#undef pp
#undef n
#undef p
#undef d
#undef g
inline char* RS(char *s){
    //gets(s);
    scanf("%s", s);
    return s;
}

LL last_ans; int Case; template<class T> inline void OT(const T &x){
    //printf("Case #%d: ", ++Case);
    //printf("%lld\n", x);
    //printf("%I64d\n", x);
    //printf("%.9f\n", x);
    //printf("%d\n", x);
    cout << x << endl;
    //last_ans = x;
}

//}/* .................................................................................................................................. */
//线段树 题意：正数插入，负数abs()位置删除 节点删除直接置为0就可
const int maxn = 1e6 + 5;
int sumt[maxn<<2];
#define rson p<<1|1
#define lson p<<1
void ins(int p, int l, int r, int k){
    if (l == r) {
        sumt[p]++; return ;
    }
    int mid = l + r >> 1;
    if (k <= mid) ins(lson, l, mid, k);
    else ins(rson, mid + 1, r, k);

    sumt[p] = sumt[lson] + sumt[rson]; //pushup
}

void del(int p, int l, int r, int k){
    if (l == r) {sumt[p]--; return ;}
    int mid = l + r >> 1;
    if (sumt[lson] >= k) del(lson, l, mid, k);
    else del(rson, mid + 1, r, k - sumt[lson]);
    sumt[p] = sumt[lson] + sumt[rson];
}

int query(int p, int l, int r){
    if (l == r){
        return l;
    }
    int mid = l + r >> 1;
    if (sumt[lson] != 0) return query(lson, l, mid);
    if (sumt[rson] != 0) return query(rson, mid + 1, r);
}

int main(){
    int n, q; RD(n, q);
    for(int i = 1; i <= n; i++){
        int x; cin >> x; ins(1, 1, n, x);
    }
    for(int que = 1; que <= q; que++){
        int x; cin >> x;
        if (x > 0) ins(1, 1, n, x);
        else { del(1, 1, n, abs(x));}
    }
    if (sumt[1]!=0) cout << query(1, 1, n) << '\n';
    else cout << 0 << '\n';
}