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

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

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

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

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

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

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

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

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

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

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

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

f.v = m
f.z = k
i.z = g
i.x = k
i.u = k
c.r = i
c.s = e
c.t = d
c.w = m
c.v = h
g.p = i
g.y = h
g.z = h
k.q = h
k.o = c
k.x = d
k.v = g
d.r = h
d.v = h
d.s = e
d.t = c
d.w = m
h.z = g
h.x = k
h.u = k
e.v = g
e.z = k
j.v = g
j.z = k
m.p = h
m.y = i
m.z = i
assert d.t.v.z.z.z.p.u.x.t.txt == "c"