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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: H = None
        self.w: H = None
        self.v: H = None
        self.y: J = None
        self.s: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: I = None
        self.z: D = None
        self.t: B = None
        self.q: D = None
        self.u: H = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: D = None
        self.s: J = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: G = None
        self.q: D = None
        self.z: E = None
        self.t: E = None
        self.s: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: A = None
        self.o: B = None
        self.u: E = None
        self.r: H = None
        self.v: H = None
        self.y: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: H = None
        self.w: H = None
        self.v: H = None
        self.y: J = None
        self.s: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: I = None
        self.z: D = None
        self.t: B = None
        self.q: D = None
        self.u: H = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: D = None
        self.s: J = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: G = None
        self.q: D = None
        self.z: E = None
        self.t: E = None
        self.s: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: A = None
        self.o: B = None
        self.u: E = None
        self.r: H = None
        self.v: H = None
        self.y: D = None
        self.txt = txt

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

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