<｜begin▁of▁sentence｜>### Instruction:
Imagine you're working with a couple to enhance their communication by visualizing the strength and connectivity of their relationship network. You have a diagram that maps out their partnership's key interactions, represented as a symbolic sequence of connections between them, their shared experiences, and crucial moments in their relationship. This sequence can be denoted by edges connecting points 'A', 'B', 'C', 'D', and 'E'.

In order to delve deeper into the analysis and use specialized tools, you wish to translate this intimate map into a more technical format without losing the meaning behind each symbol. Each point or interaction labeled 'A' through 'E' now needs to be codified into numbers, thereby simplifying the structure for computational assessment while still keeping the original labels accessible for reference.

Could you explain how you would systematically assign numerical identifiers to these personal markers in the relationship path, making sure that the original symbolic labels are maintained as informative attributes, and also organize them in a consecutive manner? This transformation should be done in such a way that the essence of these milestones is preserved, allowing you to maintain the depth of your analysis and the couple to easily recognize these symbols in their translated form.
### Response:
import networkx as nx

# Create a graph with string labels
H = nx.Graph()
H.add_edges_from([('A', 'B'), ('B', 'C'), ('C', 'D'), ('D', 'E')])

# Convert node labels to integers
G = nx.convert_node_labels_to_integers(H, first_label=0, ordering='sorted', label_attribute='old_label')

# print the nodes of G
print('Nodes of G:', G.nodes(data=True))
# print the edges of G
print('Edges of G:', G.edges())
# Access the original labels
for node in G:
    print('Node', node, 'was originally labeled', G.nodes[node]['old_label'])
<|EOT|>
