or download this
@t=map eval"sub{\$n=~tr/1234/$_/;\$n}",((1243,1432)x2,1243,4321)x4;map
+{$n=
"1234$_";map&$_,@t}map{$_,join"",(split/(....)/)[1,5,3]}341221434321,
341223414123,342121434312,431221433421,432121433412,432124133142
or download this
sub p{my($c,$i)=@_;$i==16?$c?():"":(map("0$_",p($c,$i+1)),map"7$_",p($
+c-1,$i+1)
)}@t=map eval"sub{\$n=~tr/1234/$_/;\$n}",((1243,1432)x2,1243,4321)x4;@
+f=map{$n=
"1234$_";map&$_,@t}map{$_,join"",(split/(....)/)[1,5,3]}341221434321,
341223414123,342121434312,431221433421,432121433412,432124133142;$_=po
+p;for$m(
p($_)){++$s{$m&$_}for@f}print 0+grep$_<2,values%s