<｜begin▁of▁sentence｜>### Instruction:
Given a graph with an edge set [('A', 'B'), ('B', 'C'), ('C', 'D'), ('D', 'A'), ('A', 'C'), ('B', 'D')], how can you create and display the edges and nodes of a junction tree using NetworkX?
### Response:
import networkx as nx
from networkx.algorithms.tree.decomposition import junction_tree

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

# Create junction tree of the graph
j_tree = junction_tree(G)

# Print junction tree edges
print(list(j_tree.edges()))
# Print junction tree nodes
print(list(j_tree.nodes()))
<|EOT|>
