class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: I = None
        self.r: E = None
        self.z: E = None
        self.u: J = None
        self.y: E = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.x: C = None
        self.v: D = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: C = None
        self.o: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: I = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: C = None
        self.z: D = None
        self.w: G = None
        self.t: I = None
        self.v: A = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: E = None
        self.z: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.x: C = None
        self.v: D = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: C = None
        self.o: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: I = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: C = None
        self.z: D = None
        self.w: G = None
        self.t: I = None
        self.v: A = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: E = None
        self.z: A = None
        self.txt = txt

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

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

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