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

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

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

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

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

l = A("l")
f = B("f")
b = C("b")
c = D("c")
i = E("i")
d = D("d")
m = A("m")
h = D("h")
a = B("a")
j = E("j")

l.v = h
l.o = m
l.t = a
l.z = b
f.q = a
f.s = l
f.p = l
f.w = b
b.x = a
b.s = f
b.w = d
c.z = f
i.s = j
d.z = a
m.v = h
m.o = l
m.t = a
m.z = b
h.z = a
a.q = f
a.s = m
a.p = m
a.w = b
j.s = i
assert d.z.s.v.z.w.w.z.s.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: A = None
        self.t: B = None
        self.z: C = None
        self.txt = txt

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

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

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

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

l = A("l")
f = B("f")
b = C("b")
c = D("c")
i = E("i")
d = D("d")
m = A("m")
h = D("h")
a = B("a")
j = E("j")

l.v = h
l.o = m
l.t = a
l.z = b
f.q = a
f.s = l
f.p = l
f.w = b
b.x = a
b.s = f
b.w = d
c.z = f
i.s = j
d.z = a
m.v = h
m.o = l
m.t = a
m.z = b
h.z = a
a.q = f
a.s = m
a.p = m
a.w = b
j.s = i
assert d.z.s.v.z.w.w.z.s.txt == "m"