import time
import csv
import random
import sys
from typing import List, Tuple, Optional, Any, Dict

#лимит рекурсии 
sys.setrecursionlimit(20000)