class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: C = None
        self.q: B = None
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: C = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: C = None
        self.v: B = None
        self.o: B = None
        self.u: A = None
        self.t: G = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: B = None
        self.w: E = None
        self.x: H = None
        self.y: C = None
        self.txt = txt

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

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

i = A("i")
c = B("c")
e = C("e")
j = D("j")
l = E("l")
g = F("g")
h = G("h")
d = H("d")
k = G("k")

i.s = j
i.u = e
i.x = e
i.q = c
c.u = i
e.w = d
j.u = l
j.t = e
j.s = e
l.p = k
l.x = e
l.r = e
l.v = c
l.o = c
l.u = i
l.t = h
g.p = j
g.z = c
g.w = l
g.x = d
g.y = e
h.y = e
d.q = g
d.v = i
d.o = j
d.t = j
d.p = c
d.z = k
k.y = e
assert i.s.t.w.z.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: C = None
        self.q: B = None
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: C = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: C = None
        self.v: B = None
        self.o: B = None
        self.u: A = None
        self.t: G = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: B = None
        self.w: E = None
        self.x: H = None
        self.y: C = None
        self.txt = txt

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

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

i = A("i")
c = B("c")
e = C("e")
j = D("j")
l = E("l")
g = F("g")
h = G("h")
d = H("d")
k = G("k")

i.s = j
i.u = e
i.x = e
i.q = c
c.u = i
e.w = d
j.u = l
j.t = e
j.s = e
l.p = k
l.x = e
l.r = e
l.v = c
l.o = c
l.u = i
l.t = h
g.p = j
g.z = c
g.w = l
g.x = d
g.y = e
h.y = e
d.q = g
d.v = i
d.o = j
d.t = j
d.p = c
d.z = k
k.y = e
assert i.s.t.w.z.txt == "k"