Solution by explicitly declaring a wire
module top_module(input a, output y);
// Pass-through using a net and continuous assignment
wire w;
assign w = a;
assign y = w;
endmodule
Minimal, idiomatic & identical solution with no logic or hardware differences:
module top_module (
input a,
output y
);
assign y = a;
endmodule