class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: H = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: F = None
        self.p: H = None
        self.r: A = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: D = None
        self.r: A = None
        self.s: F = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: H = None
        self.s: A = None
        self.y: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: F = None
        self.p: H = None
        self.r: A = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: D = None
        self.r: A = None
        self.s: F = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: H = None
        self.s: A = None
        self.y: D = None
        self.txt = txt

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

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

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