问题 A: Alive Fossils

内存限制:128 MB 时间限制:1 S 标准输入输出
题目类型:传统 评测方式:Special Judge 上传者:
提交:12 通过:6

题目描述

链接:https://ac.nowcoder.com/acm/contest/57362/A
来源:牛客网
Nowcoder Multi-University Training Camp is now holding again. As a contestant, you are a little bit curious about the problem setters. Now you have a list of the problem setters among all the nnn Nowcoder Multi-University Training Camps, and you are curious about the alive fossil setters, who set problems in all the nnn camps. Please output the alive fossil setters in the lexicographic order.

输入格式

The first line contains one integer nnn (1≤n≤1051\le n \le 10^51n105), denoting the number of Nowcoder Multi-University Training Camps ever held.
For each training camp:
The first line contains one integer ccc (1≤c≤1051 \le c \le 10^51c105), denoting the number of problem setters.
Each of the following ccc lines contains a string containing lowercase letters and digits only, denoting a problem setter in the camp. No problem setters appear more than once in a training camp.
It is guaranteed the total length of strings in all training camps does not exceed 10610^6106.

输出格式

Output a single integer fff in the first line, and then output all the fff alive fossil setters in the lexicographic order in the following fff lines.

输入样例 复制

2
14
buaa
bit
sunsiyu
uestc
ezec
qcjjfanclub
nfls
oscar114514
jianglyfan
gromah
calabash
lzr010506
gispzjz
roundgod
13
uestc
bit
buaa
gispzjz
roundgod
ynoi
hdu
oscar114514
gromah
calabash
quailty
nfls
sjtu

输出样例 复制

9
bit
buaa
calabash
gispzjz
gromah
nfls
oscar114514
roundgod
uestc