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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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