n = gets.to_i
s = gets.chomp
arr = [0, 0]
s.each_char{|c|
    if c < "a"
        if c < "N"
            arr[0] += 1
        else
            arr[0] -= 1
        end
    else
        if c < "n"
            arr[1] += 1
        else
            arr[1] -= 1
        end
    end
}
puts arr.map{|x| x.abs}.inject(:+)
crypt = ""
if arr[0] >= 0
    crypt += ("A" * arr[0])
else
    crypt += ("N" * (- arr[0]))
end
if arr[1] >= 0
    crypt += ("a" * arr[1])
else
    crypt += ("n" * (- arr[1]))
end
puts crypt
