#if !__INCLUDE_LEVEL__ #include __FILE__ using namespace std; using namespace m9; int main() { INT(n); STR(s); vi ans(26); for(cauto c : s)ans[c - 'A']++; for(cauto e : ans)wt(e); print(); } #else #include #include #include #include #include #include #include #include #define MY_FASTIO_VER2 //#define IS_OUTPUT_ONLY namespace m9 { struct fastin { std::array _buf; ssize_t n_w, n_r; #ifdef IS_OUTPUT_ONLY fastin() {} #else fastin() { _do_read(); } #endif long long rd_ll() noexcept { long long ret = 0, sgn = 1; signed char ch = _current_char(); while(ch == ' ' || ch == '\n')ch = _next_char(); if(ch == '-') sgn *= -1, ch = _next_char(); for(; '0' <= ch && ch <= '9'; ch = _next_char()) { ret = (ret * 10) + ch - '0'; } return sgn * ret; } double rd_dbl() noexcept { double ret{}, sgn = 1; signed char ch = _current_char(); while(ch == ' ' or ch == '\n')ch = _next_char(); if(ch == '-')sgn *= -1, ch = _next_char(); bool foundDot = false; double mul = 1; for(; ('0' <= ch && ch <= '9') or ch == '.'; ch = _next_char()) { if(ch == '.') { foundDot = true; continue; } if(foundDot) { ret = ret + (ch - '0') / (mul *= 10); } else { ret = (ret * 10) + ch - '0'; } } return sgn * ret; } int rd_int() noexcept { long long _result = rd_ll(); assert(-2147483648ll <= _result && _result <= 2147483647ll); return static_cast(_result); } std::string rd_str() noexcept { std::string _res{}; signed char ch = _current_char(); while(ch == ' ' || ch == '\n')ch = _next_char(); for(; ch != -1 && ch != '\n' && ch != ' '; ch = _next_char()) { _res += std::string(1, ch); } return _res; } char rd_chr() noexcept { signed char ch = _current_char(); while(ch == ' ' || ch == '\n')ch = _next_char(); _next_char(); return ch; } private: void _do_read() noexcept { ssize_t r = read(0, &_buf[0], _buf.size()); assert(r >= 0); n_w = r, n_r = 0; } inline signed char _next_char() noexcept { if(++n_r == n_w)_do_read(); return _current_char(); } inline signed char _current_char() noexcept { return (n_r == n_w ? -1 : _buf[n_r]); } } fi; struct fastout { unsigned _wt_double_digit = 15; inline void wt_bool(bool x) noexcept { putchar_unlocked(x ? '1' : '0'); } inline void wt_ll(long long x) noexcept { std::array _buf; ssize_t _siz = 0; if(x < 0) { x *= -1; putchar_unlocked('-'); } if(x == 0)putchar_unlocked('0'); while(x > 0) { _buf[_siz++] = x % 10 + '0'; x /= 10; } while(_siz--)putchar_unlocked(_buf[_siz]); } inline void wt_int(int x) noexcept { wt_ll(static_cast(x)); } inline void wt_ull(unsigned long long x) noexcept { std::array _buf; ssize_t _siz = 0; if(x == 0)putchar_unlocked('0'); while(x > 0) { _buf[_siz++] = x % 10 + '0'; x /= 10; } while(_siz--)putchar_unlocked(_buf[_siz]); } inline void wt_chr(char x) noexcept { putchar_unlocked(x); } inline void wt_str(std::string x) noexcept { ssize_t _siz = static_cast(x.length()); for(ssize_t i = 0; i < _siz; i++)putchar_unlocked(x[i]); } inline void wt_dbl(double x) noexcept { int k, r = 0; double v = 1; if(x < 0) { x *= -1; putchar_unlocked('-'); } x += 0.5 * pow(0.1, _wt_double_digit); while(x >= 10 * v)v *= 10, r++; while(r-- >= 0) { k = floor(x / v); if(k >= 10)k = 9; if(k <= -1)k = 0; x -= k * v; v *= 0.1; putchar_unlocked(k + '0'); } if(_wt_double_digit > 0) { putchar_unlocked('.'); v = 1; for(ssize_t _ = 0; _ < _wt_double_digit; _++) { v *= 0.1; k = floor(x / v); if(k >= 10)k = 9; if(k <= -1)k = 0; x -= k * v; putchar_unlocked(k + '0'); } } } } fo; inline void set_digit(unsigned d) { fo._wt_double_digit = d; } inline void scan(int& x) noexcept { x = fi.rd_int(); } inline void scan(long& x) noexcept { x = (sizeof(long) == 32 ? fi.rd_int() : fi.rd_ll()); } inline void scan(long long& x) noexcept { x = fi.rd_ll(); } inline void scan(unsigned& x) noexcept { int a = fi.rd_int(); assert(a >= 0); x = a; } inline void scan(unsigned long& x) noexcept { long a; scan(a); assert(a >= 0l); x = a; } inline void scan(unsigned long long& x) noexcept { long long a = fi.rd_ll(); assert(a >= 0ll); x = a; } // inline void scan(double& x) noexcept { x = static_cast(fi.rd_ll()); } inline void scan(double& x) noexcept { x = fi.rd_dbl(); } inline void scan(char& x) noexcept { x = fi.rd_chr(); } inline void scan(std::string& x) noexcept { x = fi.rd_str(); } template inline void scan(std::pair& x) { scan(x.first); scan(x.second); } template inline void scan(std::vector& x) { for(auto& e : x)scan(e); } void IN() {} template void IN(Car&& car, Cdr &&...cdr) { scan(car); IN(std::forward(cdr)...); } inline void wt_any(const bool& x) noexcept { fo.wt_bool(x); } inline void wt_any(const int& x) noexcept { fo.wt_int(x); } inline void wt_any(const long& x) noexcept { fo.wt_ll(static_cast(x)); } inline void wt_any(const long long& x) noexcept { fo.wt_ll(x); } inline void wt_any(const unsigned& x) noexcept { fo.wt_ull(static_cast(x)); } inline void wt_any(const unsigned long& x) noexcept { fo.wt_ull(static_cast(x)); } inline void wt_any(const unsigned long long& x) noexcept { fo.wt_ull(x); } inline void wt_any(const double& x) noexcept { fo.wt_dbl(x); } inline void wt_any(const long double& x) noexcept { fo.wt_dbl(x); } inline void wt_any(const char& x) noexcept { fo.wt_chr(x); } inline void wt_any(const char x[]) noexcept { size_t _siz = 0; while(x[_siz] != '\0')fo.wt_chr(x[_siz++]); } inline void wt_any(const std::string& x) noexcept { fo.wt_str(x); } template inline void wt_any(const std::pair& x) { wt_any(x.first); wt_any(' '); wt_any(x.second); } template inline void wt_any(const std::vector& x) { ssize_t _siz = x.size(); for(ssize_t i = 0; i < _siz - 1; i++)wt_any(x[i]), wt_any(' '); if(not x.empty())wt_any(x.back()); } template inline void wt_any(const std::set& x) { for(const auto& e : x)wt_any(e), wt_any(' '); } int print() { wt_any('\n'); return 0; } template int print(const T& t) { wt_any(t); wt_any('\n'); return 0; } template int print(const std::vector>& x) { for(const auto& v : x)print(v); return 0; } template int print(const Car& car, const Cdr &...cdr) { wt_any(car); wt_any(' '); print(cdr...); return 0; } template int wt(const T& t) { wt_any(t); return 0; } template int wt(const Car& car, const Cdr &...cdr) { wt_any(car); wt(cdr...); return 0; } void yn(bool fl = true) { print(fl ? "Yes" : "No"); } template void drop(const T&... x) { print(x...); exit(0); } void dyn(bool fl = true) { print(fl ? "Yes" : "No"); exit(0); } } // namespace m9 #define INT(...) int __VA_ARGS__; IN(__VA_ARGS__) #define LL(...) long long __VA_ARGS__; IN(__VA_ARGS__) #define ULL(...) unsigned long long __VA_ARGS__; IN(__VA_ARGS__) #define STR(...) std::string __VA_ARGS__; IN(__VA_ARGS__) #define CHR(...) char __VA_ARGS__; IN(__VA_ARGS__) #define DBL(...) double __VA_ARGS__; IN(__VA_ARGS__) namespace m9 { using ll = long long; using ull = unsigned long long; using pii = std::pair; using pll = std::pair; } // namespace m9 #define VEC(a, type, n) std::vector (a)(n); IN(a) #define VVEC(a, type, h, w) std::vector> (a)(h, std::vector(w)); IN(a) #define VI(a, n) VEC(a, int, n) #define VVI(a, h, w) VVEC(a, int, h, w) #define VPII(a, n) VEC(a, pii, n) #define VVPII(a, h, w) VVEC(a, pii, h, w) #define VLL(a, n) VEC(a, ll, n) #define VVLL(a, h, w) VVEC(a, ll, h, w) #define VPLL(a, n) VEC(a, pll, n) #define VVPLL(a, h, w) VVEC(a, pll, h, w) #define VULL(a, n) VEC(a, ull, n) #define VVULL(a, h, w) VVEC(a, ull, h, w) #define VC(a, n) VEC(a, char, n) #define VVC(a, h, w) VVEC(a, char, h, w) #define VD(a, n) VEC(a, double, n) #define VVD(a, h, w) VVEC(a, double, h, w) #define VS(a, n) VEC(a, std::string, n) #include namespace m9 { #define MY_MODINT template struct modInt { long long x; constexpr modInt() noexcept : x() {} template constexpr modInt(T v = 0) noexcept : x(v% Mod) { if(x < 0)x += Mod; } constexpr long long val() const noexcept { return x; } constexpr modInt operator-() const noexcept { return x ? Mod - x : 0; } constexpr modInt operator+(const modInt& r) const noexcept { return modInt(*this) += r; } constexpr modInt operator-(const modInt& r) const noexcept { return modInt(*this) -= r; } constexpr modInt operator*(const modInt& r) const noexcept { return modInt(*this) *= r; } constexpr modInt operator/(const modInt& r) const noexcept { return modInt(*this) /= r; } constexpr modInt& operator+=(const modInt& r) noexcept { x += r.x; if(x >= Mod)x -= Mod; return *this; } constexpr modInt& operator-=(const modInt& r) noexcept { x -= r.x; if(x < 0)x += Mod; return *this; } constexpr modInt& operator*=(const modInt& r) noexcept { x = x * r.x % Mod; return *this; } constexpr modInt& operator/=(const modInt& r) noexcept { x = x * r.inv().val() % Mod; return *this; } constexpr modInt powm(long long n) noexcept { if(n < 0)return powm(-n).inv(); modInt x = *this, r = 1; for(; n; x *= x, n >>= 1)if(n & 1)r *= x; return r; } constexpr modInt inv() const noexcept { long long a = x, b = Mod, u = 1, v = 0; while(b) { long long t = a / b; a -= t * b; std::swap(a, b); u -= t * v; std::swap(u, v); } return modInt(u); } constexpr modInt comb(long long a) noexcept { modInt n = *this, s = 1; for(int i = 0; i < a; i++)s *= (n - modInt(i)); modInt m = 1; for(int i = 1; i <= a; i++)m *= modInt(i); return s * m.powm(Mod - 2); } constexpr bool operator==(const modInt& r) { return this->x == r.x; } constexpr bool operator!=(const modInt& r) { return this->x != r.x; } friend std::ostream& operator<<(std::ostream& os, const modInt& a) { return os << a.x; } friend std::istream& operator>>(std::istream& is, modInt& a) { long long v; is >> v; a = modInt(v); return is; } }; template inline void wt_any(const modInt& x) { wt_any(x.val()); } using mint1000000007 = modInt<1000000007>; using mint998244353 = modInt<998244353>; mint1000000007 operator"" _m107(unsigned long long x) { return mint1000000007(x); } mint998244353 operator"" _m998(unsigned long long x) { return mint998244353(x); } struct cent_t { private: __int128_t N; public: template constexpr cent_t(T n) : N(static_cast<__int128_t>(n)) {} friend std::ostream& operator<<(std::ostream& os, const cent_t& a) { if(a.N > INT64_MAX)return os << "too big integer"; else return os << static_cast(a.N); } friend std::istream& operator>>(std::istream& is, cent_t& a) { long long tmp{}; is >> tmp; a.N = static_cast<__int128_t>(tmp); return is; } constexpr __int128_t val() const noexcept { return N; } constexpr cent_t operator-() const noexcept { return -N; } template constexpr cent_t operator+(const INTEGER& x) const noexcept { return N + x.N; } template constexpr cent_t operator-(const INTEGER& x) const noexcept { return N - x.N; } template constexpr cent_t operator*(const INTEGER& x) const noexcept { return N * x.N; } template constexpr cent_t operator/(const INTEGER& x) const noexcept { return N / x.N; } template constexpr cent_t operator<<(const INTEGER& x) const noexcept { return N << x; } template constexpr cent_t operator>>(const INTEGER& x) const noexcept { return N >> x; } template constexpr cent_t operator+=(const INTEGER& x) noexcept { N += x.N; return *this; } template constexpr cent_t operator-=(const INTEGER& x) noexcept { N -= x.N; return *this; } template constexpr cent_t operator*=(const INTEGER& x) noexcept { N *= x.N; return *this; } template constexpr cent_t operator/=(const INTEGER& x) noexcept { N /= x.N; return *this; } template constexpr cent_t operator<<=(const INTEGER& x) const noexcept { N <<= x.N; return *this; } template constexpr cent_t operator>>=(const INTEGER& x) const noexcept { N >>= x.N; return *this; } constexpr cent_t operator++() noexcept { N += 1; return *this; } constexpr cent_t operator--() noexcept { N -= 1; return *this; } template constexpr bool operator==(const INTEGER& x) { return this->N == x.N; } template constexpr bool operator!=(const INTEGER& x) { return this->N != x.N; } template constexpr bool operator<(const INTEGER& x) { return this->N < x.N; } template constexpr bool operator>(const INTEGER& x) { return this->N > x.N; } template constexpr bool operator<=(const INTEGER& x) { return this->N <= x.N; } template constexpr bool operator>=(const INTEGER& x) { return this->N >= x.N; } }; using i8 = signed char; using u8 = unsigned char; using i32 = signed int; using u32 = unsigned int; using i64 = signed long long; using u64 = unsigned long long; i8 operator"" _i8(unsigned long long x) { return static_cast(x); } u8 operator"" _u8(unsigned long long x) { return static_cast(x); } i32 operator"" _i32(unsigned long long x) { return static_cast(x); } u32 operator"" _u32(unsigned long long x) { return static_cast(x); } i64 operator"" _i64(unsigned long long x) { return static_cast(x); } u64 operator"" _u64(unsigned long long x) { return static_cast(x); } cent_t operator"" _i128(unsigned long long x) { return cent_t(x); } using f32 = float; using f64 = double; double operator"" _f32(unsigned long long x) { return static_cast(x); } double operator"" _f64(unsigned long long x) { return static_cast(x); } } // namespace m9 #include #include #include #include #include // #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //#define INCLUDE_BOOST #ifdef INCLUDE_BOOST #if __has_include() #include #include #include #include #include #endif #endif //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,fma,abm,mmx,avx,avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #define all(x) std::begin(x), std::end(x) #define Sort(x) sort(all(x)) #define rSort(x) sort(all(x)); reverse(all(x)) #define UNIQUE(v) v.erase(unique(all(v)), v.end()) #define uniq(v) sort(all(v)); UNIQUE(v) #define l_b(c, x) distance(begin(c), lower_bound(all(c), (x))) #define u_b(c, x) distance(begin(c), upper_bound(all(c), (x))) #define fi first #define se second #define m_p make_pair #define m_t make_tuple #define pb push_back #define eb emplace_back #define cauto const auto& #define _rep_overload(_1, _2, _3, _4, name, ...) name #define _rep1(i, n) _rep2(i, 0, n) #define _rep2(i, a, b) for(ll i = (a); i < (b); i++) #define _rep3(i, a, b, c) for(ll i = (a); i < (b); i += c) #define rep(...) _rep_overload(__VA_ARGS__, _rep3, _rep2, _rep1)(__VA_ARGS__) #define myceil(a, b) ((a) + ((b) - 1)) / (b) #define continue_with(...) ({__VA_ARGS__; continue;}) #define break_with(...) ({__VA_ARGS__; break;}) namespace m9 { using ll = long long; using ull = unsigned long long; using pii = std::pair; using pll = std::pair; } // namespace m9 namespace m9 { template using V = std::vector; using vb = V; using vi = V; using vu = V; using vll = V; using vull = V; using vd = V; using vc = V; using vs = V; using vpii = V; using vpll = V; using vvb = V; using vvi = V; using vvu = V; using vvll = V; using vvull = V; using vvd = V; using vvc = V; using vvs = V; using vvpii = V; using vvpll = V; template inline bool chmin(T& a, const T& b) { if(b < a) { a = b; return true; } return false; } template inline bool chmax(T& a, const T& b) { if(a < b) { a = b; return true; } return false; } ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } ll fact(ll n, ll m) { ll f = n; for(ll i = n - 1; i >= 1; i--) { f *= i; if(m != -1)f %= m; } return f; } constexpr ll inf = 0x1fffffffffffffff; constexpr ll mod = 1000000007LL; constexpr ll mod2 = 998244353LL; constexpr double eps = 1e-8; constexpr double pi = 3.141592653589793238462643383279; } // namespace m9 namespace m9 { struct sorted_operator { template friend std::vector operator>>(std::vectora, sorted_operator) { std::sort(std::begin(a), std::end(a)); return a; } friend std::string operator>>(std::string a, sorted_operator) { std::sort(std::begin(a), std::end(a)); return a; } } Sor; struct reversed_operator { template friend std::vector operator>>(std::vector a, reversed_operator) { std::reverse(std::begin(a), std::end(a)); return a; } friend std::string operator>>(std::string a, reversed_operator) { std::reverse(std::begin(a), std::end(a)); return a; } } Rev; struct unique_operator { template friend std::vector operator>>(std::vector a, unique_operator) { a.erase(unique(std::begin(a), std::end(a)), std::end(a)); return a; } friend std::string operator>>(std::string a, unique_operator) { a.erase(unique(std::begin(a), std::end(a)), std::end(a)); return a; } } Set; template void INCVEC(std::vector& a) { for(T& e : a)e++; } template void DECVEC(std::vector& a) { for(T& e : a)e--; } struct inc_operator { template friend std::vector operator>>(std::vector a, inc_operator) { INCVEC(a); return a; } } Inc; struct dec_operator { template friend std::vector operator>>(std::vector a, dec_operator) { DECVEC(a); return a; } } Dec; template auto operator>> (std::vector a, F f) -> std::vector { std::vector res{}; for(const T& e : a)res.emplace_back(f(e)); return res; } } // namespace m9 // debug #ifdef ONLINE_JUDGE #define dbg(...) void(0) #else #define dbg(...) _debug(#__VA_ARGS__, __VA_ARGS__) #endif namespace m9 { template void _debug(const char* s, Car&& car, Cdr&&... cdr) { constexpr const char* open_br = sizeof...(cdr) == 0 ? "" : "("; constexpr const char* close_br = sizeof...(cdr) == 0 ? "" : ")"; #ifdef MY_FASTIO_VER2 wt_any(open_br); wt_any(s); wt_any(close_br); wt_any(" : "); wt_any(open_br); wt_any(std::forward(car)); ((wt_any(", "), wt_any(std::forward(cdr))), ...); wt_any(close_br); wt_any("\n"); #else std::cerr << open_br << s << close_br << " : " << open_br << std::forward(car); ((std::cerr << ", " << std::forward(cdr)), ...); std::cerr << close_br << "\n"; #endif } } // namespace m9 #endif