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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: H = None
        self.t: H = None
        self.z: G = None
        self.v: H = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: E = None
        self.p: A = None
        self.u: C = None
        self.t: G = None
        self.v: B = None
        self.y: H = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: D = None
        self.p: B = None
        self.z: D = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: G = None
        self.txt = txt

c = A("c")
m = B("m")
e = C("e")
a = D("a")
d = E("d")
i = F("i")
h = G("h")
g = H("g")
b = C("b")
k = F("k")

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: H = None
        self.t: H = None
        self.z: G = None
        self.v: H = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: E = None
        self.p: A = None
        self.u: C = None
        self.t: G = None
        self.v: B = None
        self.y: H = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: D = None
        self.p: B = None
        self.z: D = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: G = None
        self.txt = txt

c = A("c")
m = B("m")
e = C("e")
a = D("a")
d = E("d")
i = F("i")
h = G("h")
g = H("g")
b = C("b")
k = F("k")

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