class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: G = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: D = None
        self.r: A = None
        self.u: G = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: F = None
        self.s: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

m.s = c
m.u = b
m.o = h
e.q = a
e.o = l
e.r = m
e.u = b
e.p = j
c.y = e
c.s = e
c.p = a
l.t = b
l.y = b
h.x = j
h.o = m
h.u = m
h.r = b
h.w = b
h.z = a
h.s = e
h.t = c
a.s = j
b.p = m
b.o = c
b.x = j
j.r = e
assert a.s.r.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: G = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: D = None
        self.r: A = None
        self.u: G = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: F = None
        self.s: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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