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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: G = None
        self.o: G = None
        self.u: G = None
        self.t: G = None
        self.p: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: G = None
        self.z: G = None
        self.s: G = None
        self.txt = txt

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

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

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

a.u = l
a.t = l
a.o = l
a.p = g
a.x = h
a.y = b
a.q = m
a.s = d
e.v = b
e.q = a
l.t = m
b.z = d
b.y = m
b.o = m
b.u = m
b.t = m
b.p = g
g.w = b
h.q = a
h.y = m
h.z = m
h.s = m
m.o = e
m.x = d
m.w = g
m.p = h
m.t = a
d.o = m
d.p = m
assert d.p.x.o.o.v.o.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: E = None
        self.x: F = None
        self.t: C = None
        self.y: D = None
        self.q: G = None
        self.o: C = None
        self.s: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: G = None
        self.o: G = None
        self.u: G = None
        self.t: G = None
        self.p: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: G = None
        self.z: G = None
        self.s: G = None
        self.txt = txt

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

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

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

a.u = l
a.t = l
a.o = l
a.p = g
a.x = h
a.y = b
a.q = m
a.s = d
e.v = b
e.q = a
l.t = m
b.z = d
b.y = m
b.o = m
b.u = m
b.t = m
b.p = g
g.w = b
h.q = a
h.y = m
h.z = m
h.s = m
m.o = e
m.x = d
m.w = g
m.p = h
m.t = a
d.o = m
d.p = m
assert d.p.x.o.o.v.o.txt == "m"