class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: F = None
        self.t: C = None
        self.w: F = None
        self.p: C = None
        self.y: B = None
        self.q: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: J = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: D = None
        self.x: D = None
        self.s: D = None
        self.r: J = None
        self.z: C = None
        self.t: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.q: I = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: F = None
        self.r: D = None
        self.u: J = None
        self.x: I = None
        self.t: E = None
        self.y: J = None
        self.p: J = None
        self.o: J = None
        self.txt = txt

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

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

c = A("c")
f = B("f")
d = C("d")
m = D("m")
h = E("h")
b = F("b")
i = G("i")
g = H("g")
a = I("a")
n = J("n")

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: J = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: D = None
        self.x: D = None
        self.s: D = None
        self.r: J = None
        self.z: C = None
        self.t: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.q: I = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: F = None
        self.r: D = None
        self.u: J = None
        self.x: I = None
        self.t: E = None
        self.y: J = None
        self.p: J = None
        self.o: J = None
        self.txt = txt

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

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

c = A("c")
f = B("f")
d = C("d")
m = D("m")
h = E("h")
b = F("b")
i = G("i")
g = H("g")
a = I("a")
n = J("n")

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