#include <iostream>
#include <cmath>
#include <string>

using std::string;

int main() {
    int n;
    string s;
    std::cin >> n >> s;
    int x = 0, y = 0;
    for (char c : s) {
        if ('A' <= c && c <= 'M') {
            ++x;
        } else if ('N' <= c && c <= 'Z') {
            --x;
        } else if ('a' <= c && c <= 'm') {
            ++y;
        } else {
            --y;
        }
    }

    std::cout << std::abs(x) + std::abs(y) << std::endl;
    while (x > 0) {
        std::cout << 'A';
        --x;
    }
    while (x < 0) {
        std::cout << 'N';
        ++x;
    }
    while (y > 0) {
        std::cout << 'a';
        --y;
    }
    while (y < 0) {
        std::cout << 'n';
        ++y;
    }
    std::cout << std::endl;
    return 0;
}

