#include <bits/stdc++.h>

using namespace std;

int main() {
  int N;
  cin >> N;
  int d = floor(1.08 * N) - 206;
  if(d > 0)
    cout << ":(";
  else if(d == 0)
    cout << "so-so";
  else if(d < 0)
    cout << "Yay!";
  cout << endl;
}
#line 1 "main.cpp"
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>

using namespace std;

void solve() {
    int n;
    cin >> n;

    cout << (1 << n) - 1 << "\n";
    for (int b = 1; b < (1 << n); ++b) {
        for (int x = 0; x < (1 << n); ++x) {
            cout << "AB"[__builtin_popcount(x & b) % 2];
        }
        cout << "\n";
    }
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    solve();

    return 0;
}
