#include<iostream>
#include<algorithm>
#include<cstdlib>

using namespace std;

int main(){
    
    int n,x,y;
    char c;
    cin >> n;
    x = 0;
    y = 0;
    while(n--){
        cin >> c;
        if('A' <= c && c <= 'M'){
            y++;
        } else if('N' <= c && c <= 'Z'){
            y--;
        } else if('a' <= c && c <= 'm'){
            x++;
        } else if('n' <= c && c <= 'z'){
            x--;
        }
    }
    
    cout << abs(x)+abs(y) << endl;
    if(abs(x)+abs(y) == 0) return 0;
    
    while(abs(x)+abs(y) != 0){
        if(y > 0){
            y--;
            cout << 'A';
        } else if(y < 0){
            y++;
            cout << 'N';
        } else if(x > 0){
            x--;
            cout << 'a';
        } else if(x < 0){
            x++;
            cout << 'n';
        }
    }
    
    cout << endl;
    
    return(0);
}
