P5042 [CTT Mutual Test 2015] The Lost Problem Statement (ydc’s statement).

Description

Once, there was a problem statement placed in front of ydc, but he did not cherish it, and only felt deep regret after it was lost. If Heaven could give him one more chance, ydc would definitely remember this problem statement firmly. But there is no way—since it has already been lost, this problem can only be done with your help for ydc. The only information known is that this is a traditional problem, it uses full-text comparison, the time limit is 1 s, and the memory limit is 256 MB. ydc also provides you with all the testdata for this problem (see the attachment).

Input Format

Already given.

Output Format

Already given.

Explanation/Hint

### Source China National CTT Mutual Test 2015. ### Author Yu Jiping. Translated by ChatGPT 5