How do you plan to solve it?
module top_module( input a,b, output y ); assign y = (a === b) ? a : 1'bx; endmodule