class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: J = None
        self.y: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: B = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: D = None
        self.u: C = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: J = None
        self.q: F = None
        self.z: C = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: E = None
        self.z: F = None
        self.v: A = None
        self.p: J = None
        self.r: J = None
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: H = None
        self.o: E = None
        self.t: B = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: B = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: D = None
        self.u: C = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: J = None
        self.q: F = None
        self.z: C = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: E = None
        self.z: F = None
        self.v: A = None
        self.p: J = None
        self.r: J = None
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: H = None
        self.o: E = None
        self.t: B = None
        self.v: F = None
        self.txt = txt

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

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