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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: H = None
        self.r: G = None
        self.y: G = None
        self.x: A = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: A = None
        self.x: C = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: A = None
        self.s: H = None
        self.y: A = None
        self.u: D = None
        self.x: H = None
        self.z: D = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: E = None
        self.z: H = None
        self.s: E = None
        self.q: C = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: F = None
        self.q: E = None
        self.s: D = None
        self.w: C = None
        self.y: G = None
        self.txt = txt

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

e.u = m
c.s = h
c.u = e
c.z = m
h.z = a
h.u = a
h.q = a
h.r = b
h.y = b
h.x = e
k.q = a
k.s = e
k.x = h
k.u = h
m.r = k
m.u = k
m.z = k
m.w = k
m.q = e
m.y = e
m.s = a
m.x = a
j.o = b
j.y = m
j.s = m
j.z = a
j.q = h
j.v = c
b.x = a
a.o = j
a.x = j
a.q = m
a.s = k
a.w = h
a.y = b
assert m.y.u.y.u.w.q.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: H = None
        self.r: G = None
        self.y: G = None
        self.x: A = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: A = None
        self.x: C = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: A = None
        self.s: H = None
        self.y: A = None
        self.u: D = None
        self.x: H = None
        self.z: D = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: E = None
        self.z: H = None
        self.s: E = None
        self.q: C = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: F = None
        self.q: E = None
        self.s: D = None
        self.w: C = None
        self.y: G = None
        self.txt = txt

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

e.u = m
c.s = h
c.u = e
c.z = m
h.z = a
h.u = a
h.q = a
h.r = b
h.y = b
h.x = e
k.q = a
k.s = e
k.x = h
k.u = h
m.r = k
m.u = k
m.z = k
m.w = k
m.q = e
m.y = e
m.s = a
m.x = a
j.o = b
j.y = m
j.s = m
j.z = a
j.q = h
j.v = c
b.x = a
a.o = j
a.x = j
a.q = m
a.s = k
a.w = h
a.y = b
assert m.y.u.y.u.w.q.txt == "a"