result(0).

tree(1,or,2,3).
tree(2,or,4,5).
tree(3,or,6,7).
tree(4,or,8,9).
tree(5,or,10,11).
tree(6,and,12,13).
tree(7,and,14,15).
tree(8,or,16,17).
tree(9,or,18,19).

leaf(10,0).
leaf(11,0).
leaf(12,0).
leaf(13,0).
leaf(14,0).
leaf(15,0).
leaf(16,0).
leaf(17,1).
leaf(18,0).
leaf(19,1).
