8590: KFC Crazy Thursday

内存限制:256 MB 时间限制:1 S
题面:传统 评测方式:文本比较 上传者:
提交:2 通过:1

题目描述

One day, NIO found an email on his computer from his friend Kala. He opened the email and found a picture with a large string of 26 lowercase letters. He asked Kala why he had sent him this picture. Kala said it was a challenge he had given to NIO: if NIO could figure out the number of palindromes end with 'k', 'f' and 'c' , he would buy NIO a KFC combo. The clever NIO turned on a AI software and converted all the letters on the image into a text file. NIO promised that he will share the KFC combo with you if you can help him. 

输入格式

The first line a number N, denoting the length of the string.
The second line is a string consists of lower letters 'a' to 'z'.
1≤N≤5×105

输出格式

A line with 3 numbers, denoting the number of palindromes, that end with 'k', 'f' and 'c'.

输入样例 复制

6
kfccfk

输出样例 复制

3 3 3

数据范围与提示

For the first 'k', 1 palindrome.
For the second 'k', 2 palindromes.
For the first 'f', 1 palindrome.
For the second 'f', 2 palindromes.
For the first 'c', 1 palindrome.
For the second 'c', 2 palindromes.