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

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: C = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: J = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: D = None
        self.q: I = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: G = None
        self.o: G = None
        self.t: G = None
        self.v: G = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: F = None
        self.r: B = None
        self.u: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: G = None
        self.o: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: B = None
        self.txt = txt

h = A("h")
c = B("c")
m = C("m")
n = D("n")
j = E("j")
d = F("d")
k = G("k")
f = H("f")
b = I("b")
i = J("i")

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

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: C = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: J = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: D = None
        self.q: I = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: G = None
        self.o: G = None
        self.t: G = None
        self.v: G = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: F = None
        self.r: B = None
        self.u: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: G = None
        self.o: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: B = None
        self.txt = txt

h = A("h")
c = B("c")
m = C("m")
n = D("n")
j = E("j")
d = F("d")
k = G("k")
f = H("f")
b = I("b")
i = J("i")

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