module parity3(A, B, C, P); input A; input B; input C; output P; assign P = A ^ B ^ C; endmodule