class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: F = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: E = None
        self.q: C = None
        self.r: C = None
        self.y: F = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: E = None
        self.p: B = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

g = A("g")
a = B("a")
j = C("j")
i = D("i")
l = E("l")
c = F("c")

g.z = i
g.w = c
g.t = c
a.z = c
a.y = c
a.s = l
a.u = l
a.q = j
a.r = j
j.r = l
j.s = l
j.v = l
j.p = a
i.o = c
l.z = a
l.o = c
l.y = c
l.u = c
l.q = g
c.y = j
assert a.s.q.z.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: F = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: E = None
        self.q: C = None
        self.r: C = None
        self.y: F = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: E = None
        self.p: B = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

g = A("g")
a = B("a")
j = C("j")
i = D("i")
l = E("l")
c = F("c")

g.z = i
g.w = c
g.t = c
a.z = c
a.y = c
a.s = l
a.u = l
a.q = j
a.r = j
j.r = l
j.s = l
j.v = l
j.p = a
i.o = c
l.z = a
l.o = c
l.y = c
l.u = c
l.q = g
c.y = j
assert a.s.q.z.o.txt == "c"