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

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

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: J = None
        self.w: F = None
        self.q: J = None
        self.z: I = None
        self.t: G = None
        self.s: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: J = None
        self.w: F = None
        self.q: J = None
        self.z: I = None
        self.t: G = None
        self.s: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: F = None
        self.txt = txt

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

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