⁕7-3 sdut-图的字典表示
n=int(input())
num=0
sum=0
for i in range(n):
dic=eval(input())
for j in dic:
temp=dic[j]
num+=len(temp)
for key in temp:
sum+=temp[key]
# print("----------")
print(n,num,sum)
n=int(input())
num=0
sum=0
for i in range(n):
dic=eval(input())
for j in dic:
temp=dic[j]
num+=len(temp)
for key in temp:
sum+=temp[key]
# print("----------")
print(n,num,sum)