From diagram 2, only half of the cycles of alternating current can pass from the unknown component.
It has to be a diode because a diode can only allow current flow in one direction in circuits.