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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: H = None
        self.u: B = None
        self.y: G = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: H = None
        self.p: C = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: J = None
        self.w: F = None
        self.q: D = None
        self.s: B = None
        self.y: G = None
        self.r: G = None
        self.v: A = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: D = None
        self.x: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: E = None
        self.z: B = None
        self.u: A = None
        self.q: D = None
        self.txt = txt

j = A("j")
d = B("d")
f = C("f")
k = D("k")
g = E("g")
c = F("c")
a = G("a")
e = H("e")
m = I("m")
i = J("i")

j.z = k
j.y = k
j.q = c
j.v = c
j.s = f
j.w = g
j.p = e
j.t = a
d.p = e
d.q = e
d.z = e
d.u = g
d.x = c
f.z = g
f.x = g
f.t = j
f.r = e
f.q = a
f.s = d
k.w = i
k.z = i
k.x = i
k.s = c
k.p = d
k.r = a
k.u = m
k.t = g
g.v = i
c.q = m
c.v = e
c.u = d
c.y = a
c.w = k
a.o = d
a.q = d
a.u = e
a.p = f
e.z = i
e.x = i
e.w = c
e.q = k
e.o = k
e.s = d
e.y = a
e.r = a
e.v = j
m.p = e
m.s = k
m.x = i
i.o = c
i.v = g
i.z = d
i.u = j
i.q = k
assert j.z.s.w.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: F = None
        self.y: D = None
        self.s: C = None
        self.w: E = None
        self.v: F = None
        self.p: H = None
        self.t: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: H = None
        self.u: B = None
        self.y: G = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: H = None
        self.p: C = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: J = None
        self.w: F = None
        self.q: D = None
        self.s: B = None
        self.y: G = None
        self.r: G = None
        self.v: A = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: D = None
        self.x: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: E = None
        self.z: B = None
        self.u: A = None
        self.q: D = None
        self.txt = txt

j = A("j")
d = B("d")
f = C("f")
k = D("k")
g = E("g")
c = F("c")
a = G("a")
e = H("e")
m = I("m")
i = J("i")

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