class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: H = None
        self.p: D = None
        self.t: D = None
        self.v: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: A = None
        self.s: F = None
        self.v: F = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: B = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: A = None
        self.s: F = None
        self.v: F = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: B = None
        self.t: D = None
        self.txt = txt

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

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

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