def read_graph(conn):
    """Read the jump graph from the database.

    Args:
        conn: A Connection.

    Returns:
        A map from solar system name to a list of adjacent solar systems.
        E.g. 'Rens' -> ['Abudban', 'Odatrik', 'Frarn']
    """
    cursor = conn.cursor()
    cursor.execute('SELECT s.solarSystemName, m.itemID '
                   'FROM mapdenormalize m '
                   'JOIN mapsolarsystems s '
                   'ON s.solarSystemID = m.solarSystemID '
                   'WHERE m.groupID = 10;')
    locations = {} # gate id -> solar system
    for row in cursor:
        locations[row[1]] = row[0]

    cursor.execute('SELECT stargateID, celestialID FROM mapjumps;')

    adjacency = {} # solar system -> [adjacent solar systems]
    for row in cursor:
        adjacency.setdefault(locations[row[0]], []).append(locations[row[1]])

    return adjacency