<｜begin▁of▁sentence｜>### Instruction:
Given a directed acyclic graph with edge set [(1, 2), (2, 3), (2, 4)], use NetworkX to generate and print all possible topological sorting orders.
### Response:
import networkx as nx

# Create a directed acyclic graph (DAG)
DG = nx.DiGraph([(1,2), (2,3), (2,4)])

# Generate all topological sorts of the graph
all_sorts = list(nx.all_topological_sorts(DG))

# Print all topological sorts
for sort in all_sorts:
    print(sort)
<|EOT|>
