class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: D = None
        self.r: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: C = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: I = None
        self.z: B = None
        self.w: A = None
        self.t: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: C = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: I = None
        self.z: B = None
        self.w: A = None
        self.t: D = None
        self.txt = txt

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

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