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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: C = None
        self.p: C = None
        self.y: C = None
        self.x: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: E = None
        self.p: C = None
        self.x: E = None
        self.y: B = None
        self.txt = txt

j = A("j")
a = B("a")
c = C("c")
l = D("l")
i = E("i")
g = D("g")
e = E("e")

j.u = e
a.v = j
c.x = e
c.z = a
c.q = a
c.w = a
l.s = c
l.z = c
l.p = c
l.y = c
l.x = g
i.r = l
i.q = e
i.x = e
i.p = c
i.y = a
g.s = c
g.z = c
g.p = c
g.y = c
g.x = l
e.r = l
e.q = i
e.x = i
e.p = c
e.y = a
assert l.y.q.v.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: C = None
        self.p: C = None
        self.y: C = None
        self.x: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: E = None
        self.p: C = None
        self.x: E = None
        self.y: B = None
        self.txt = txt

j = A("j")
a = B("a")
c = C("c")
l = D("l")
i = E("i")
g = D("g")
e = E("e")

j.u = e
a.v = j
c.x = e
c.z = a
c.q = a
c.w = a
l.s = c
l.z = c
l.p = c
l.y = c
l.x = g
i.r = l
i.q = e
i.x = e
i.p = c
i.y = a
g.s = c
g.z = c
g.p = c
g.y = c
g.x = l
e.r = l
e.q = i
e.x = i
e.p = c
e.y = a
assert l.y.q.v.u.txt == "e"