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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: C = None
        self.t: B = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: A = None
        self.q: C = None
        self.v: G = None
        self.t: A = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: E = None
        self.w: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: C = None
        self.t: B = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: A = None
        self.q: C = None
        self.v: G = None
        self.t: A = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: E = None
        self.w: E = None
        self.txt = txt

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

g.r = d
g.o = e
d.p = e
m.w = d
m.s = e
e.r = d
e.t = d
e.z = m
e.q = h
k.q = h
k.o = h
h.w = d
h.u = d
h.s = b
h.t = e
h.r = e
h.v = j
h.o = k
h.z = g
n.p = m
n.q = m
n.r = g
n.t = g
n.x = g
n.v = b
j.r = e
j.t = a
j.w = a
a.q = h
a.o = h
b.p = m
b.q = m
b.r = g
b.t = g
b.x = g
b.v = n
assert m.s.q.z.o.txt == "e"