`from collections import deque, defaultdict`