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

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

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

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

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

e = A("e")
a = B("a")
c = C("c")
k = D("k")
f = E("f")
j = E("j")
g = A("g")

e.s = f
a.v = g
c.z = g
c.o = e
c.t = j
k.q = c
k.p = a
k.s = a
k.o = j
f.q = a
f.z = c
f.u = c
j.q = a
j.z = c
j.u = c
g.s = f
assert c.o.s.q.v.s.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

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

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

e = A("e")
a = B("a")
c = C("c")
k = D("k")
f = E("f")
j = E("j")
g = A("g")

e.s = f
a.v = g
c.z = g
c.o = e
c.t = j
k.q = c
k.p = a
k.s = a
k.o = j
f.q = a
f.z = c
f.u = c
j.q = a
j.z = c
j.u = c
g.s = f
assert c.o.s.q.v.s.u.o.txt == "e"