Figure out the sequence
题号:NC205164
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

The Coronavirus is evil and loves to store everything into its RNA, which is why it often has genetic mutation.


One day the Coronavirus get two RNA sequences, and it decided to add them to its RNA. It will add the first sequence to the end of its current RNA, and next turn it will add the another one.

For the following turns, the virus will always add the sequence it got in the previous turn to the beginning of the current sequence.


Suppose the virus has nothing in its RNA initially, and two RNA sequences are: (The virus has no sanity, so the RNA sequence can be far more than "agcu" ! ) , the final RNA sequence after each turn will be:


……

As an expert in biochemistry, GGG has been devoting himself into analyzing this virus since its outbreak, whose task is to figure out the exact composition of this virus (That is: how many times does each letter appear in the final sequence). However, what he can get is only how many turns the virus has changed its RNA and the initial two sequences. can you help him to solve this problem?

输入描述:

The input only consists of one test case.

The first line and the second line will be two string  and , which are the initial RNA sequences, the sequences are both made up of lower-case Latin letters and upper-case Latin letters. The virus starts with string .

The third line will be an integer , which is the number of turns that the virus has taken to modify its RNA.

It's guaranteed that , the length of two strings .

输出描述:

The output should contain several lines for each letters in the final RNA sequence in lexicographical order.

Each line should be in format like , the first letter is the related lower-case letter, the second one is a colon, the third one is a space and then is an integer  which is the number of occurrences of this letter in the final RNA sequence.

If a letter doesn't appear in the sequence, you can simply ignore it.

示例1

输入

复制
Abc
def
4

输出

复制
A: 1
b: 1
c: 1
d: 2
e: 2
f: 2