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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: A = None
        self.q: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.t: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.o: J = None
        self.p: A = None
        self.t: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: F = None
        self.x: F = None
        self.v: B = None
        self.z: G = None
        self.t: B = None
        self.s: G = None
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: A = None
        self.q: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.t: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.o: J = None
        self.p: A = None
        self.t: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: F = None
        self.x: F = None
        self.v: B = None
        self.z: G = None
        self.t: B = None
        self.s: G = None
        self.p: C = None
        self.txt = txt

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

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