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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: A = None
        self.r: C = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: B = None
        self.o: A = None
        self.z: C = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: C = None
        self.o: E = None
        self.v: A = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: B = None
        self.q: B = None
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: A = None
        self.r: C = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: B = None
        self.o: A = None
        self.z: C = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: C = None
        self.o: E = None
        self.v: A = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: B = None
        self.q: B = None
        self.u: B = None
        self.txt = txt

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

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