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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: A = None
        self.r: D = None
        self.q: C = None
        self.w: A = None
        self.s: I = None
        self.v: G = None
        self.o: G = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: F = None
        self.w: J = None
        self.p: I = None
        self.s: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: B = None
        self.s: I = None
        self.z: G = None
        self.v: H = None
        self.q: B = None
        self.w: A = None
        self.o: B = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: F = None
        self.u: I = None
        self.q: F = None
        self.y: E = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: A = None
        self.r: D = None
        self.q: C = None
        self.w: A = None
        self.s: I = None
        self.v: G = None
        self.o: G = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: F = None
        self.w: J = None
        self.p: I = None
        self.s: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: B = None
        self.s: I = None
        self.z: G = None
        self.v: H = None
        self.q: B = None
        self.w: A = None
        self.o: B = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: F = None
        self.u: I = None
        self.q: F = None
        self.y: E = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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