UVa 10062 - Tell me the frequencies!

10062 - Tell me the frequencies!

 * http://acm.uva.es/p/v100/10062.html

Summary
This is a standard sorting problem. Since $$N \leq 96$$, a short $$O(N^2)$$ algorithm will work too.

Explanation
This is as straightforward as it's going to get.

Gotcha's

 * Watch out for the non-alphanumerics.

Input
AAABBC 122333

Output
67 1 66 2 65 3

49 1 50 2 51 3