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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: C = None
        self.v: D = None
        self.t: D = None
        self.u: D = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: C = None
        self.v: D = None
        self.t: D = None
        self.u: D = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: C = None
        self.txt = txt

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

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

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