def is_nexto(st_i, st_j, nexto):
    """Whther station i is next to station j.

    Args:
        st_i: str, station name.
        st_j: str, station name.
        nexto: map, adjacency table of subway system.

    Return:
        True: if station i is next to station j.
        False: ohterwise.
    """
    assert st_i in nexto, "station don't exist."
    assert st_j in nexto, "station don't exist."

    for edge in nexto[st_j]:
        if edge.station_to == st_i:
            return True
    return False