class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: D = None
        self.q: G = None
        self.s: F = None
        self.y: C = None
        self.t: B = None
        self.u: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: F = None
        self.u: D = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

b.x = e
b.t = e
b.z = c
b.q = j
b.s = k
b.y = d
b.u = d
e.s = d
e.v = k
e.y = k
e.r = i
e.o = m
d.z = j
d.s = m
d.y = i
d.u = i
d.x = k
d.w = c
c.z = m
c.p = i
i.x = c
i.s = k
k.o = m
j.t = k
j.p = k
j.u = c
j.y = e
m.z = k
assert i.x.p.s.o.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: D = None
        self.q: G = None
        self.s: F = None
        self.y: C = None
        self.t: B = None
        self.u: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: F = None
        self.u: D = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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