class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: C = None
        self.r: D = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: E = None
        self.w: F = None
        self.o: D = None
        self.z: A = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: D = None
        self.s: A = None
        self.q: F = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: B = None
        self.y: E = None
        self.w: F = None
        self.q: C = None
        self.txt = txt

a = A("a")
f = B("f")
i = C("i")
e = D("e")
b = E("b")
d = F("d")
c = C("c")
k = F("k")

a.z = b
a.v = i
a.q = i
a.r = e
f.t = e
f.r = i
i.s = d
i.q = d
i.p = b
i.w = k
i.o = e
i.z = a
e.s = f
e.o = a
b.o = c
b.p = e
b.s = a
b.q = d
b.t = f
d.z = a
d.v = f
d.y = b
d.w = k
d.q = i
c.s = k
c.w = k
c.p = b
c.o = e
c.z = a
c.q = d
k.z = a
k.v = f
k.y = b
k.w = d
k.q = c
assert e.s.r.w.v.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: C = None
        self.r: D = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: E = None
        self.w: F = None
        self.o: D = None
        self.z: A = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: D = None
        self.s: A = None
        self.q: F = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: B = None
        self.y: E = None
        self.w: F = None
        self.q: C = None
        self.txt = txt

a = A("a")
f = B("f")
i = C("i")
e = D("e")
b = E("b")
d = F("d")
c = C("c")
k = F("k")

a.z = b
a.v = i
a.q = i
a.r = e
f.t = e
f.r = i
i.s = d
i.q = d
i.p = b
i.w = k
i.o = e
i.z = a
e.s = f
e.o = a
b.o = c
b.p = e
b.s = a
b.q = d
b.t = f
d.z = a
d.v = f
d.y = b
d.w = k
d.q = i
c.s = k
c.w = k
c.p = b
c.o = e
c.z = a
c.q = d
k.z = a
k.v = f
k.y = b
k.w = d
k.q = c
assert e.s.r.w.v.txt == "f"