class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: A = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: C = None
        self.o: D = None
        self.y: C = None
        self.w: D = None
        self.txt = txt

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

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

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

e = A("e")
i = B("i")
j = C("j")
g = D("g")
h = E("h")
d = B("d")
f = A("f")
k = B("k")

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: C = None
        self.o: D = None
        self.y: C = None
        self.w: D = None
        self.txt = txt

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

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

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

e = A("e")
i = B("i")
j = C("j")
g = D("g")
h = E("h")
d = B("d")
f = A("f")
k = B("k")

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