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

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

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

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

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

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

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

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

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

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

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

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

h.v = n
h.t = d
h.u = e
l.z = m
l.s = c
l.w = n
j.o = a
j.q = c
j.x = c
j.r = m
a.v = h
a.w = j
e.u = h
e.y = k
e.t = j
e.q = j
n.v = h
n.w = m
c.z = m
c.s = l
c.w = a
m.o = a
m.q = l
m.r = j
m.x = c
d.z = m
d.s = c
d.w = n
k.u = h
k.y = e
k.t = m
k.q = m
assert k.u.u.y.u.t.s.s.z.txt == "m"