#!/usr/bin/perl
$a=pop; FOO: while(<>){$w=$_;chomp;$b=$a;
$b=~s/$l//i or next FOO while($l=chop);print $w;}
