#include <bits/stdc++.h>
using namespace std;
bool book[100000];
int main()
{
int n; cin>>n;
while(n--){
int m,t; cin>>m;
if(m==1) cin>>t;
else while(m--){
cin>>t;
book[t]=1;
}
}
cin>>n;
bool flag=0;
while(n--){
int t; cin>>t;
if(!book[t]){
if(flag) cout<<' ';
printf("%05d",t);
book[t]=1;
flag=1;
}
}
if(!flag) cout<<"No one is handsome";
return 0;
}