class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: C = None
        self.x: H = None
        self.z: C = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: B = None
        self.t: G = None
        self.o: E = None
        self.txt = txt

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

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

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

a.s = j
a.u = j
a.z = j
a.x = h
a.t = f
m.o = a
j.v = a
j.q = b
j.s = k
k.x = m
k.v = j
k.z = j
k.q = a
b.w = j
g.u = a
g.y = m
g.t = f
g.o = b
f.u = g
f.x = g
f.s = a
f.z = k
f.o = k
f.y = j
h.u = g
h.w = a
h.o = k
h.v = m
h.t = f
h.y = f
assert m.o.u.q.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: C = None
        self.x: H = None
        self.z: C = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: B = None
        self.t: G = None
        self.o: E = None
        self.txt = txt

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

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

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

a.s = j
a.u = j
a.z = j
a.x = h
a.t = f
m.o = a
j.v = a
j.q = b
j.s = k
k.x = m
k.v = j
k.z = j
k.q = a
b.w = j
g.u = a
g.y = m
g.t = f
g.o = b
f.u = g
f.x = g
f.s = a
f.z = k
f.o = k
f.y = j
h.u = g
h.w = a
h.o = k
h.v = m
h.t = f
h.y = f
assert m.o.u.q.txt == "b"