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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: D = None
        self.v: A = None
        self.txt = txt

j = A("j")
c = B("c")
m = C("m")
a = D("a")
e = E("e")
i = D("i")
n = D("n")
h = B("h")
l = A("l")

j.x = h
j.z = h
j.p = e
c.r = j
m.t = e
m.u = l
a.w = c
a.y = e
e.o = l
e.v = l
e.t = a
i.w = h
i.y = e
n.w = h
n.y = e
h.r = j
l.x = c
l.p = e
l.z = h
assert m.u.x.r.z.r.z.r.p.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: E = None
        self.z: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: D = None
        self.v: A = None
        self.txt = txt

j = A("j")
c = B("c")
m = C("m")
a = D("a")
e = E("e")
i = D("i")
n = D("n")
h = B("h")
l = A("l")

j.x = h
j.z = h
j.p = e
c.r = j
m.t = e
m.u = l
a.w = c
a.y = e
e.o = l
e.v = l
e.t = a
i.w = h
i.y = e
n.w = h
n.y = e
h.r = j
l.x = c
l.p = e
l.z = h
assert m.u.x.r.z.r.z.r.p.txt == "e"