When every edge has the same weight, BFS gives shortest paths. Each BFS level represents one more edge traversed, so multiply the level by to get the distance.
Build an adjacency list from the edges. Start BFS at node s with distance . For each neighbor not yet visited, set its distance to current distance + 6. Nodes never reached keep their default distance of .
No priority queue needed. No relaxation step. Plain BFS handles uniform-weight graphs perfectly.