<｜begin▁of▁sentence｜>### Instruction:
Given a graph with nodes labeled 1 through 5 and edges (1-2), (1-3), (2-4), (3-4), (4-5), what is the sequence of nodes visited using a breadth-first traversal strategy, ensuring that for all nodes except the first one, at least one of their neighbors appeared earlier?
### Response:
import networkx as nx

# Create a graph
G = nx.Graph()

# Add edges to the graph
G.add_edges_from([(1, 2), (1, 3), (2, 4), (3, 4), (4, 5)])

# Import the breadth-first traversal strategy
from networkx.algorithms.traversal.breadth_first_search import *

# Apply the BFS traversal strategy
ordering = strategy_connected_sequential_bfs(G)
print(list(ordering))
<|EOT|>
