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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: D = None
        self.y: E = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: D = None
        self.y: E = None
        self.s: D = None
        self.txt = txt

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

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

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

e.z = f
e.t = f
e.y = f
e.s = h
e.v = h
m.w = h
m.x = h
m.q = f
j.v = l
j.w = f
j.s = f
j.y = a
f.y = d
f.p = d
f.v = j
f.x = a
f.r = h
a.o = h
a.t = h
a.z = l
l.z = f
l.t = f
l.y = f
l.s = h
l.v = m
h.w = m
h.x = m
h.q = f
d.v = e
d.w = f
d.s = f
d.y = a
assert e.v.q.r.q.v.y.o.txt == "h"