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

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: D = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: H = None
        self.u: J = None
        self.s: D = None
        self.v: H = None
        self.t: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: H = None
        self.u: B = None
        self.v: C = None
        self.x: F = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: J = None
        self.t: D = None
        self.w: B = None
        self.p: F = None
        self.u: A = None
        self.r: F = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: F = None
        self.x: J = None
        self.o: C = None
        self.t: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: D = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: H = None
        self.u: J = None
        self.s: D = None
        self.v: H = None
        self.t: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: H = None
        self.u: B = None
        self.v: C = None
        self.x: F = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: J = None
        self.t: D = None
        self.w: B = None
        self.p: F = None
        self.u: A = None
        self.r: F = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: F = None
        self.x: J = None
        self.o: C = None
        self.t: C = None
        self.txt = txt

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

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

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