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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

j = A("j")
h = B("h")
e = C("e")
c = D("c")
k = E("k")
d = A("d")
m = D("m")
f = B("f")
l = E("l")

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

j = A("j")
h = B("h")
e = C("e")
c = D("c")
k = E("k")
d = A("d")
m = D("m")
f = B("f")
l = E("l")

j.v = k
h.z = f
h.u = l
e.y = h
c.p = m
c.w = k
c.o = e
c.x = f
c.z = d
k.v = l
k.t = l
k.o = h
k.z = m
d.v = k
m.p = c
m.w = l
m.o = e
m.x = f
m.z = d
f.z = h
f.u = l
l.v = k
l.t = k
l.o = f
l.z = c
assert e.y.u.v.z.w.v.txt == "k"