<>;
($x,@a)=sort{$a<=>$b}glob<>;
for(@a){
	$d=$x^$_;
	$m=1<<30;
	$m>>=1until!$m|$m&$d;
	$a|=$m;
	$x=$_;
}
print 2**unpack("%b*",pack N,$a)%998244353;