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

class B:
    def __init__(self, txt: str):
        self.r: J = None
        self.s: G = None
        self.x: A = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: I = None
        self.z: E = None
        self.x: H = None
        self.y: H = None
        self.w: J = None
        self.o: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: A = None
        self.s: I = None
        self.v: G = None
        self.y: J = None
        self.z: J = None
        self.x: F = None
        self.w: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: C = None
        self.o: B = None
        self.z: B = None
        self.v: D = None
        self.x: G = None
        self.p: A = None
        self.u: C = None
        self.txt = txt

h = A("h")
m = B("m")
d = C("d")
k = D("k")
g = E("g")
e = F("e")
b = G("b")
i = H("i")
n = I("n")
l = J("l")

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

class B:
    def __init__(self, txt: str):
        self.r: J = None
        self.s: G = None
        self.x: A = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: I = None
        self.z: E = None
        self.x: H = None
        self.y: H = None
        self.w: J = None
        self.o: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: A = None
        self.s: I = None
        self.v: G = None
        self.y: J = None
        self.z: J = None
        self.x: F = None
        self.w: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: C = None
        self.o: B = None
        self.z: B = None
        self.v: D = None
        self.x: G = None
        self.p: A = None
        self.u: C = None
        self.txt = txt

h = A("h")
m = B("m")
d = C("d")
k = D("k")
g = E("g")
e = F("e")
b = G("b")
i = H("i")
n = I("n")
l = J("l")

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