#include <bits/stdc++.h>

using namespace std;

using i64 = long;

const i64 MOD = 1e9 + 7;
const i64 INF = 1e18 + 7;


signed main(){
    int n;
    string s;
    cin >> n >> s;
    int dx = 0, dy = 0;
    for(int i = 0; i < n; ++i){
        int c = s[i];
        if('A' <= c && c <= 'M')
            ++dy;
        if('N' <= c && c <= 'Z')
            --dy;
        if('a' <= c && c <= 'm')
            ++dx;
        if('n' <= c && c <= 'z')
            --dx;
    }
    cout << abs(dx) + abs(dy) << endl;
    for(int i = 0; i < abs(dy); ++i)
        cout << (dy < 0 ? 'N' : 'A');
    for(int i = 0; i < abs(dx); ++i)
        cout << (dx < 0 ? 'n' : 'a');
    if(abs(dx) + abs(dy))
        cout << endl;
}

