New Year Letter

Many countries have such a New Year or Christmas tradition as writing a letter to Santa including a wish list for presents. Vasya is an ordinary programmer boy. Like all ordinary boys, he is going to write the letter to Santa on the New Year Eve (we Russians actually expect Santa for the New Year, not for Christmas).

Vasya has come up with an algorithm he will follow while writing a letter. First he chooses two strings, s 1 anf s 2, consisting of uppercase English letters. Then the boy makes string s k, using a recurrent equation s n = s n - 2 + s n - 1, operation ‘+’ means a concatenation (that is, the sequential record) of strings in the given order. Then Vasya writes down string s k on a piece of paper, puts it in the envelope and sends in to Santa.

Vasya is absolutely sure that Santa will bring him the best present if the resulting string s k has exactly x occurrences of substring AC (the short-cut reminds him оf accepted problems). Besides, Vasya decided that string s 1 should have length n, and string s 2 should have length m. Vasya hasn’t decided anything else.

At the moment Vasya’s got urgent New Year business, so he asks you to choose two strings for him, s 1 and s 2 in the required manner. Help Vasya.

Input

The first line contains four integers k, x, n, m (3 ≤ k ≤ 50; 0 ≤ x ≤ 109; 1 ≤ n, m ≤ 100).

Output

In the first line print string s 1, consisting of n uppercase English letters. In the second line print string s 2, consisting of m uppercase English letters. If there are multiple valid strings, print any of them.

If the required pair of strings doesn’t exist, print “Happy new year!” without the quotes.

Examples

input

3 2 2 2

output

AC
AC

input

3 3 2 2

output

Happy new year!

input

3 0 2 2

output

AA
AA

input

4 3 2 1

output

Happy new year!

input

4 2 2 1

output

Happy new year!

Solution:

#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <memory.h>

using namespace std;

char ans[1234];

void print(char from, char to, int len, int occ) {
int st = 1;
if (from == 'A') st = 0;
for (int i = 0; i < len; i++) ans[i] = 'B';
  for (int i = 0; i < occ; i++) {
    ans[st + 2 * i] = 'A';
    ans[st + 2 * i + 1] = 'C';
  }
  ans[0] = from;
  ans[len - 1] = to;
  for (int i = 0; i < len; i++) putchar(ans[i]);
  putchar('\n');
}

const long long N = 1234;

char start[N], finish[N];
long long occ[N];

int main() {
  long long k, x, n, m;
  cin >> k >> x >> n >> m;
for (char from_1 = 'A'; from_1 <= 'C'; from_1++)
    for (char to_1 = 'A'; to_1 <= 'C'; to_1++)
      if (n == 1 && from_1 != to_1) continue; else {
        for (char from_2 = 'A'; from_2 <= 'C'; from_2++)
          for (char to_2 = 'A'; to_2 <= 'C'; to_2++)
            if (m == 1 && from_2 != to_2) continue; else {
              long long in_1 = n - (from_1 != 'A') - (to_1 != 'C');
              long long in_2 = m - (from_2 != 'A') - (to_2 != 'C');
              in_1 /= 2;
              in_2 /= 2;
              for (long long occ_1 = 0; occ_1 <= in_1; occ_1++)
                for (long long occ_2 = 0; occ_2 <= in_2; occ_2++) {
                  if (n == 2 && from_1 == 'A' && to_1 == 'C' && occ_1 == 0) continue;
                  if (m == 2 && from_2 == 'A' && to_2 == 'C' && occ_2 == 0) continue;
                  start[1] = from_1;
                  finish[1] = to_1;
                  occ[1] = occ_1;
                  start[2] = from_2;
                  finish[2] = to_2;
                  occ[2] = occ_2;
                  for (long long i = 3; i <= k; i++) {
                    start[i] = start[i - 2];
                    finish[i] = finish[i - 1];
                    occ[i] = occ[i - 2] + occ[i - 1] + (finish[i - 2] == 'A' && start[i - 1] == 'C');
                  }
                  if (occ[k] == x) {
                    print(from_1, to_1, n, occ_1);
                    print(from_2, to_2, m, occ_2);
                    return 0;
                  }
                }
            }
      }
  printf("Happy new year!\n");
  return 0;
}