I have used two input OR gate instead of three input. Because three input OR gate is not simulated.