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

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

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

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

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

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

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

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

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

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

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

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

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