#include<iostream>#include<cstring>usingnamespacestd;
int toInt(char *str) {
int n = 0;
int m = 1;
int size = strlen(str);
for (int i = size - 1; i >= 0; i--) {
n += (str[i] - '0') * m;
m *= 10;
}
return n;
}
int main() {
int f[100001] = {0};
int n;
cin >> n;
for (int i = 0; i < n; i++) {
int m = 0;
cin >> m;
for (int j = 0; j < m; j++) {
char t[10];
cin >> t;
if (m == 1) {
break;
} else {
f[toInt(t)]++;
}
}
}
cin >> n;
bool isHas = false;
for (int i = 0; i < n; i++) {
char t[10];
cin >> t;
if (f[toInt(t)] == 0) {
if (isHas) {
cout << " ";
}
isHas = true;
cout << t ;
f[toInt(t)] = 1;
}
}
if (!isHas) {
cout << "No one is handsome";
}
cout << endl;
return0;
}