p={} i={} ARGV.each{|x|i[x]=1}.clear while l=gets;l.gsub(/\S+/){|s|p[s]=''if !p[s];p[s]<<$`+$&.upcase+$'if !i[s]}end p.sort.each{|x,y|print y}