module AOI2222 (Z,A1,A2,B1,B2,C1,C2,D1,D2);

  output  Z;
  input   A1;
  input   A2;
  input   B1;
  input   B2;
  input   C1;
  input   C2;
  input   D1;
  input   D2;

  wire w0,w1,w2,w3;
  wire Z,A1,A2,B1,B2,C1,C2,D1,D2 ;

  and  a0 (w0,A1,A2);
  and  a1 (w1,B1,B2);
  and  a2 (w2,C1,C2);
  and  a3 (w3,D1,D2);
  nor  n4 (Z,w0,w1,w2,w3);

endmodule
