<｜begin▁of▁sentence｜>### Instruction:
Given a graph with the edge set [('A', 'B'), ('A', 'C'), ('B', 'C'), ('C', 'D')], how can we find all the cliques present in the graph and list them?
### Response:
import networkx as nx

# Create an undirected graph
G = nx.Graph()
# Add edges
G.add_edges_from([('A', 'B'), ('A', 'C'), ('B', 'C'), ('C', 'D')])

# Use enumerate_all_cliques to get all cliques in the graph
all_cliques = list(nx.enumerate_all_cliques(G))

# Print all cliques
for clique in all_cliques:
    print(clique)
<|EOT|>
