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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: H = None
        self.r: F = None
        self.u: D = None
        self.z: E = None
        self.x: C = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: G = None
        self.o: H = None
        self.r: D = None
        self.v: A = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: H = None
        self.z: F = None
        self.r: F = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: C = None
        self.o: C = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: H = None
        self.w: H = None
        self.r: B = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: D = None
        self.w: B = None
        self.z: C = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: H = None
        self.r: F = None
        self.u: D = None
        self.z: E = None
        self.x: C = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: G = None
        self.o: H = None
        self.r: D = None
        self.v: A = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: H = None
        self.z: F = None
        self.r: F = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: C = None
        self.o: C = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: H = None
        self.w: H = None
        self.r: B = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: D = None
        self.w: B = None
        self.z: C = None
        self.x: C = None
        self.txt = txt

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

m.x = f
m.z = c
c.w = a
c.r = a
c.p = a
c.t = h
c.u = b
c.z = f
c.x = l
l.x = b
l.r = b
l.t = j
l.o = h
l.v = m
l.s = f
b.v = c
b.q = h
b.z = a
b.r = a
b.p = a
f.s = c
a.r = m
a.q = l
a.o = l
a.u = h
j.x = f
j.o = h
j.w = h
j.r = c
j.v = a
h.o = j
h.r = b
h.w = c
h.z = l
h.x = l
assert c.z.s.u.v.txt == "c"