Problem: 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, s1 anf s2, consisting of uppercase English letters. Then the boy makes string sk, using a recurrent equation sn = sn - 2 + sn - 1, operation '+' means a concatenation (that is, the sequential record) of strings in the given order. Then Vasya writes down string sk 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 sk has exactly x occurrences of substring AC (the short-cut reminds him оf accepted problems). Besides, Vasya decided that string s1 should have length n, and string s2 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, s1 and s2 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 s1, consisting of n uppercase English letters. In the second line print string s2, 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 (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int k;
int x, n, m;
long long s1[55], s2[55], s12[55], s21[55], s22[55], s11[55];
int main() {
  cin >> k >> x >> n >> m;
  int t11 = 1;
  int t12 = 1;
  int t21 = 2;
  int t22 = 2;
  s1[0] = 1;
  s1[1] = 0;
  s2[1] = 1;
  s2[0] = 0;
  s12[0] = 0;
  s12[1] = 0;
  s21[0] = 0;
  s21[1] = 0;
  s11[0] = 0;
  s11[1] = 0;
  s22[0] = 0;
  s22[1] = 0;
  for (int i = 2; i < k; i++) {
    s1[i] = s1[i - 2] + s1[i - 1];
    s2[i] = s2[i - 2] + s2[i - 1];
    s12[i] = s12[i - 2] + s12[i - 1];
    s21[i] = s21[i - 2] + s21[i - 1];
    s12[i] = s12[i - 2] + s12[i - 1];
    s22[i] = s22[i - 2] + s22[i - 1];
    int t31 = t11;
    int t32 = t22;
    if (t12 == t21) {
      if (t12 == 1)
        s11[i]++;
      else
        s22[i]++;
    } else {
      if (t12 == 1)
        s12[i]++;
      else
        s21[i]++;
    }
    t11 = t21;
    t12 = t22;
    t21 = t31;
    t22 = t32;
  }
  bool done = 0;
  if (m == 1) {
    if (n == 1) {
      if (x == s12[k - 1]) {
        cout << "A" << endl;
        cout << "C" << endl;
        done = 1;
      } else if (x == s21[k - 1]) {
        cout << "C" << endl;
        cout << "A" << endl;
        done = 1;
      } else {
        cout << "Happy new year!" << endl;
        done = 1;
      }
    } else {
      int tmp = x;
      for (int j = 0; j <= n; j += 2) {
        x = tmp - s1[k - 1] * j / 2;
        if (x < 0) continue;
        if (n - j > 0 && (x - s12[k - 1]) % s2[k - 1] == 0 &&
            (x - s12[k - 1]) / s2[k - 1] <= (m - 1) / 2) {
          for (int i = 0; i < j / 2; i++) cout << "AC";
          for (int i = 0; i < n - j - 1; i++) cout << "K";
          cout << "A";
          cout << endl;
          cout << "C";
          for (int i = 0; i < (x - s12[k - 1]) / s2[k - 1]; i++) cout << "AC";
          for (int i = 0; i < m - 1 - 2 * ((x - s12[k - 1]) / s2[k - 1]); i++)
            cout << "K";
          cout << endl;
          done = 1;
        } else if (n - j > 0 && (x - s21[k - 1]) % s2[k - 1] == 0 &&
                   (x - s21[k - 1]) / s2[k - 1] <= (m - 1) / 2) {
          cout << "C";
          for (int i = 0; i < j / 2; i++) cout << "AC";
          for (int i = 0; i < n - j - 1; i++) cout << "K";
          cout << endl;
          for (int i = 0; i < (x - s21[k - 1]) / s2[k - 1]; i++) cout << "AC";
          for (int i = 0; i < m - 1 - 2 * ((x - s21[k - 1]) / s2[k - 1]); i++)
            cout << "K";
          cout << "A" << endl;
          done = 1;
        }
        if (done) break;
      }
    }
  } else {
    int tmp = x;
    for (int j = 0; j <= n; j += 2) {
      x = tmp - s1[k - 1] * j / 2;
      if (x < 0) continue;
      if (x % s2[k - 1] == 0 && x / s2[k - 1] <= m / 2) {
        for (int i = 0; i < j / 2; i++) cout << "AC";
        for (int i = 0; i < n - j; i++) cout << "K";
        cout << endl;
        for (int i = 0; i < x / s2[k - 1]; i++) cout << "AC";
        for (int i = 0; i < m - 2 * (x / s2[k - 1]); i++) cout << "K";
        cout << endl;
        done = 1;
      } else if (n - j > 0 && (x - s12[k - 1]) % s2[k - 1] == 0 &&
                 (x - s12[k - 1]) / s2[k - 1] <= (m - 1) / 2) {
        for (int i = 0; i < j / 2; i++) cout << "AC";
        for (int i = 0; i < n - j - 1; i++) cout << "K";
        cout << "A";
        cout << endl;
        cout << "C";
        for (int i = 0; i < (x - s12[k - 1]) / s2[k - 1]; i++) cout << "AC";
        for (int i = 0; i < m - 1 - 2 * ((x - s12[k - 1]) / s2[k - 1]); i++)
          cout << "K";
        cout << endl;
        done = 1;
      } else if ((x - s22[k - 1]) % s2[k - 1] == 0 &&
                 (x - s22[k - 1]) / s2[k - 1] <= (m - 2) / 2) {
        for (int i = 0; i < j / 2; i++) cout << "AC";
        for (int i = 0; i < n - j; i++) cout << "K";
        cout << endl;
        cout << "C";
        for (int i = 0; i < (x - s22[k - 1]) / s2[k - 1]; i++) cout << "AC";
        for (int i = 0; i < m - 2 - 2 * ((x - s22[k - 1]) / s2[k - 1]); i++)
          cout << "K";
        cout << "A" << endl;
        done = 1;
      } else if (n - j > 0 && (x - s21[k - 1]) % s2[k - 1] == 0 &&
                 (x - s21[k - 1]) / s2[k - 1] <= (m - 1) / 2) {
        cout << "C";
        for (int i = 0; i < j / 2; i++) cout << "AC";
        for (int i = 0; i < n - j - 1; i++) cout << "K";
        cout << endl;
        for (int i = 0; i < (x - s21[k - 1]) / s2[k - 1]; i++) cout << "AC";
        for (int i = 0; i < m - 1 - 2 * ((x - s21[k - 1]) / s2[k - 1]); i++)
          cout << "K";
        cout << "A" << endl;
        done = 1;
      } else if (n - j > 0 && (x - s22[k - 1] - s21[k - 1]) % s2[k - 1] == 0 &&
                 (x - s22[k - 1] - s21[k - 1]) / s2[k - 1] <= (m - 2) / 2) {
        cout << "C";
        for (int i = 0; i < j / 2; i++) cout << "AC";
        for (int i = 0; i < n - j - 1; i++) cout << "K";
        cout << endl;
        cout << "C";
        for (int i = 0; i < (x - s22[k - 1] - s21[k - 1]) / s2[k - 1]; i++)
          cout << "AC";
        for (int i = 0;
             i < m - 2 - 2 * ((x - s22[k - 1] - s21[k - 1]) / s2[k - 1]); i++)
          cout << "K";
        cout << "A" << endl;
        done = 1;
      } else if (n - j > 0 &&
                 (x - s22[k - 1] - s21[k - 1] - s12[k - 1]) % s2[k - 1] == 0 &&
                 (x - s22[k - 1] - s21[k - 1] - s12[k - 1]) / s2[k - 1] <=
                     (m - 2) / 2) {
        cout << "C";
        for (int i = 0; i < j / 2; i++) cout << "AC";
        for (int i = 0; i < n - j - 2; i++) cout << "K";
        cout << "A";
        cout << endl;
        cout << "C";
        for (int i = 0; i < (x - s22[k - 1] - s21[k - 1]) / s2[k - 1]; i++)
          cout << "AC";
        for (int i = 0;
             i < m - 2 - 2 * ((x - s22[k - 1] - s21[k - 1]) / s2[k - 1]); i++)
          cout << "K";
        cout << "A" << endl;
        done = 1;
      }
      if (done) break;
    }
  }
  if (!done) {
    cout << "Happy new year!" << endl;
  }
  return 0;
}