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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: C = None
        self.z: E = None
        self.q: D = None
        self.txt = txt

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

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

c = A("c")
k = B("k")
n = C("n")
b = D("b")
d = E("d")
f = A("f")
g = C("g")
a = E("a")
m = E("m")
l = A("l")

c.v = m
c.z = m
c.q = m
c.u = g
k.y = b
k.v = b
n.r = d
n.p = g
n.z = m
n.q = b
b.x = k
d.o = g
d.r = k
f.v = m
f.u = n
f.z = d
f.q = a
g.r = d
g.z = d
g.p = n
g.q = b
a.o = n
a.r = k
m.o = g
m.r = k
l.v = a
l.z = a
l.u = g
l.q = m
assert g.q.x.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: C = None
        self.z: E = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: C = None
        self.z: E = None
        self.q: D = None
        self.txt = txt

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

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

c = A("c")
k = B("k")
n = C("n")
b = D("b")
d = E("d")
f = A("f")
g = C("g")
a = E("a")
m = E("m")
l = A("l")

c.v = m
c.z = m
c.q = m
c.u = g
k.y = b
k.v = b
n.r = d
n.p = g
n.z = m
n.q = b
b.x = k
d.o = g
d.r = k
f.v = m
f.u = n
f.z = d
f.q = a
g.r = d
g.z = d
g.p = n
g.q = b
a.o = n
a.r = k
m.o = g
m.r = k
l.v = a
l.z = a
l.u = g
l.q = m
assert g.q.x.v.x.txt == "k"