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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: H = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: C = None
        self.s: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: B = None
        self.v: C = None
        self.x: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: H = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: C = None
        self.s: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: B = None
        self.v: C = None
        self.x: A = None
        self.txt = txt

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

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