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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: F = None
        self.p: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: A = None
        self.z: G = None
        self.w: J = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: A = None
        self.q: J = None
        self.w: A = None
        self.r: J = None
        self.t: C = None
        self.p: J = None
        self.z: D = None
        self.o: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: A = None
        self.p: G = None
        self.z: G = None
        self.w: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: F = None
        self.p: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: A = None
        self.z: G = None
        self.w: J = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: A = None
        self.q: J = None
        self.w: A = None
        self.r: J = None
        self.t: C = None
        self.p: J = None
        self.z: D = None
        self.o: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: A = None
        self.p: G = None
        self.z: G = None
        self.w: H = None
        self.txt = txt

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

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