.model top
.inputs pa pb pc
.outputs pd pe pf pg
.names pa pb pe
01 1
10 1
.names pa pb pc pf
001 1
110 1
.names pc pg
0 1
.names pc pd
1 1
.end