48 lines
902 B
Python
48 lines
902 B
Python
"""
|
|
name: Nicholas Tamassia
|
|
|
|
Honor Code and Acknowledgments:
|
|
|
|
This work complies with the JMU Honor Code.
|
|
|
|
Comments here on your code and submission.
|
|
"""
|
|
|
|
from collections import deque
|
|
|
|
|
|
def whatever_first_search(
|
|
graph: dict[str, set[str]], start: str, stop: str
|
|
) -> list[str]:
|
|
|
|
return []
|
|
|
|
|
|
# All modules for CS 412 must include a main method that allows it
|
|
# to imported and invoked from other python scripts
|
|
def main():
|
|
n: int = int(input())
|
|
|
|
graph: dict[str, set[str]] = {}
|
|
|
|
for _ in range(0, n):
|
|
u, v = input().split()
|
|
|
|
if u not in graph:
|
|
graph[u] = set([v])
|
|
else:
|
|
graph[u].add(v)
|
|
|
|
target = input().split()
|
|
|
|
path = whatever_first_search(graph, target[0], target[1])
|
|
|
|
if len(path) == 0:
|
|
print("no route possible")
|
|
else:
|
|
print(" ".join(path))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|