#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <numeric>
#include <deque>
using namespace std;
typedef long long int ll;

char t[4]={'A','N','a','n'};

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int a[4]={};
    int n; cin >> n;
    string s; cin >> s;
    for(char c:s){
        if('A'<=c&&c<='M')a[0]++;
        if('N'<=c&&c<='Z')a[1]++;
        if('a'<=c&&c<='m')a[2]++;
        if('n'<=c&&c<='z')a[3]++;
    }
    if(a[0]>a[1]){
        a[0]-=a[1];
        a[1]=0;
    }else{
        a[1]-=a[0];
        a[0]=0;
    }
    if(a[2]>a[3]){
        a[2]-=a[3];
        a[3]=0;
    }else{
        a[3]-=a[2];
        a[2]=0;
    }
    cout << a[0]+a[1]+a[2]+a[3] << endl; 
    for(int i=0;i<4;i++){
        for(int j=0;j<a[i];j++){
            cout << t[i];
        }
    }
    cout << endl;
}
