class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: A = None
        self.t: E = None
        self.y: B = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: C = None
        self.q: A = None
        self.t: C = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: E = None
        self.z: B = None
        self.w: B = None
        self.s: E = None
        self.txt = txt

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

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

i = A("i")
e = B("e")
d = C("d")
l = D("l")
f = E("f")
b = A("b")
h = B("h")
m = A("m")
n = E("n")

i.p = h
i.y = h
i.v = h
i.z = m
i.t = n
e.u = n
e.p = n
e.w = d
e.t = d
e.q = m
d.u = m
d.x = f
d.s = f
d.z = h
d.w = e
l.x = h
f.x = n
f.z = n
b.p = h
b.y = h
b.v = h
b.z = i
b.t = n
h.u = n
h.p = n
h.w = d
h.t = d
h.q = m
m.p = h
m.y = h
m.z = i
m.t = f
m.v = e
n.x = f
n.z = f
assert f.z.x.z.z.x.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: A = None
        self.t: E = None
        self.y: B = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: C = None
        self.q: A = None
        self.t: C = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: E = None
        self.z: B = None
        self.w: B = None
        self.s: E = None
        self.txt = txt

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

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

i = A("i")
e = B("e")
d = C("d")
l = D("l")
f = E("f")
b = A("b")
h = B("h")
m = A("m")
n = E("n")

i.p = h
i.y = h
i.v = h
i.z = m
i.t = n
e.u = n
e.p = n
e.w = d
e.t = d
e.q = m
d.u = m
d.x = f
d.s = f
d.z = h
d.w = e
l.x = h
f.x = n
f.z = n
b.p = h
b.y = h
b.v = h
b.z = i
b.t = n
h.u = n
h.p = n
h.w = d
h.t = d
h.q = m
m.p = h
m.y = h
m.z = i
m.t = f
m.v = e
n.x = f
n.z = f
assert f.z.x.z.z.x.txt == "n"