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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: D = None
        self.o: B = None
        self.w: D = None
        self.r: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: F = None
        self.q: A = None
        self.txt = txt

j = A("j")
d = B("d")
f = C("f")
m = D("m")
i = E("i")
l = F("l")
h = G("h")
k = H("k")

j.s = d
d.p = j
f.x = h
f.r = h
f.t = m
f.w = m
f.o = d
m.z = f
m.t = f
m.p = l
m.r = d
m.y = i
m.q = j
i.z = h
i.w = h
i.p = h
i.x = k
i.t = m
i.u = l
i.o = j
l.w = k
l.u = k
l.s = f
h.u = f
k.w = m
k.z = l
k.q = j
assert j.s.p.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: D = None
        self.o: B = None
        self.w: D = None
        self.r: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: F = None
        self.q: A = None
        self.txt = txt

j = A("j")
d = B("d")
f = C("f")
m = D("m")
i = E("i")
l = F("l")
h = G("h")
k = H("k")

j.s = d
d.p = j
f.x = h
f.r = h
f.t = m
f.w = m
f.o = d
m.z = f
m.t = f
m.p = l
m.r = d
m.y = i
m.q = j
i.z = h
i.w = h
i.p = h
i.x = k
i.t = m
i.u = l
i.o = j
l.w = k
l.u = k
l.s = f
h.u = f
k.w = m
k.z = l
k.q = j
assert j.s.p.s.txt == "d"