class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: A = None
        self.t: H = None
        self.o: B = None
        self.q: F = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.r: E = None
        self.y: C = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: C = None
        self.v: F = None
        self.r: F = None
        self.y: F = None
        self.txt = txt

i = A("i")
j = B("j")
l = C("l")
d = D("d")
k = E("k")
a = F("a")
e = G("e")
b = H("b")

i.x = d
i.q = e
j.u = e
j.x = i
l.z = e
d.y = j
k.s = d
k.w = i
k.t = b
k.o = j
k.q = a
k.v = e
a.t = k
a.x = k
a.r = k
a.w = k
a.y = l
e.z = b
e.s = l
b.x = e
b.w = l
b.v = a
b.r = a
b.y = a
assert k.v.z.w.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: A = None
        self.t: H = None
        self.o: B = None
        self.q: F = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.r: E = None
        self.y: C = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: C = None
        self.v: F = None
        self.r: F = None
        self.y: F = None
        self.txt = txt

i = A("i")
j = B("j")
l = C("l")
d = D("d")
k = E("k")
a = F("a")
e = G("e")
b = H("b")

i.x = d
i.q = e
j.u = e
j.x = i
l.z = e
d.y = j
k.s = d
k.w = i
k.t = b
k.o = j
k.q = a
k.v = e
a.t = k
a.x = k
a.r = k
a.w = k
a.y = l
e.z = b
e.s = l
b.x = e
b.w = l
b.v = a
b.r = a
b.y = a
assert k.v.z.w.txt == "l"