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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: E = None
        self.q: H = None
        self.p: J = None
        self.u: F = None
        self.s: D = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: D = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: J = None
        self.z: B = None
        self.y: I = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: 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.o: D = None
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.q: B = None
        self.x: H = None
        self.r: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: E = None
        self.q: H = None
        self.p: J = None
        self.u: F = None
        self.s: D = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: D = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: J = None
        self.z: B = None
        self.y: I = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: 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.o: D = None
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.q: B = None
        self.x: H = None
        self.r: C = None
        self.txt = txt

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

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

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