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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: G = None
        self.w: I = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: C = None
        self.s: E = None
        self.o: I = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: J = None
        self.z: J = None
        self.u: C = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: B = None
        self.z: B = None
        self.v: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: G = None
        self.w: I = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: C = None
        self.s: E = None
        self.o: I = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: J = None
        self.z: J = None
        self.u: C = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: B = None
        self.z: B = None
        self.v: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

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