Gason and his bestie Gteve love the letter 'G', and they successfully hacked into the Villager News' director's computer where the director stores all of the news headlines to be broadcasted. Since Gason loves the letter 'G' so much, he decides to replace the first character of every single headline with the uppercase letter 'G'! Now Gason is watching the Villager News (with Gteve) and is wondering how many headlines he modified made it into the actual news broadcast.
Given the initial headlines stored on the news director's computer and the final headlines which were actually broadcasted, determine how many headlines in the news broadcast were those possibly modified by Gason and Gteve.
Everything is case-sensitive!!!
The first line contains a single integer $$$1\leq n\leq 110$$$, the number of initial news headlines on the news director's computer.
The next $$$n$$$ lines each contain a single string $$$s_i$$$: the $$$i^{th}$$$ headline stored on the news director's computer before Gason's modification ($$$1\leq |s_i| \leq 67$$$). It is guaranteed that the $$$s_i$$$'s are distinct.
The next line contains a single integer $$$1\leq m \leq 111$$$, the number of headlines which were broadcasted on the Villager News.
The last $$$m$$$ lines each contain a single string $$$t_i$$$: the $$$i^{th}$$$ headline broadcasted on the Villager News ($$$1\leq |t_i| \leq 67$$$). It is guaranteed that the $$$t_i$$$'s are distinct.
Every single character in each string is alphanumeric or an underscore.
Output a single integer, the number of headlines in the Villager News broadcast which could have been modified by Gason and Gteve.
We have provided sample input parsing scripts in C++, Java, and Python below for the first two problems.
6The_Blatant_AdvertBREAKING_NEWSCHRISTMASWARTHE_GIANT_PROBLEMTestificate_News7Ghe_Blatant_AdvertGREAKING_NEWSGHRISTMASGARGHE_GIANT_PROBLEMGestificate_NewsHacker_Messes_with_Villager_News_Headlines
6
567GasonandSteve4GGasonandGteve
3
| Name |
|---|


