-- Create hierarchical table (org chart)
CREATE TABLE employees (
id SERIAL PRIMARY KEY,
name VARCHAR(100) NOT NULL,
title VARCHAR(100),
manager_id INT REFERENCES employees(id),
from collections import defaultdict
from dataclasses import dataclass, field
from typing import Callable, Dict, List, Set
class CycleError(Exception):