class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: C = None
        self.v: I = None
        self.u: J = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: C = None
        self.q: I = None
        self.p: J = None
        self.o: E = None
        self.u: A = None
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: D = None
        self.u: E = None
        self.q: E = None
        self.x: G = None
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: I = None
        self.o: D = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: H = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: C = None
        self.q: I = None
        self.p: J = None
        self.o: E = None
        self.u: A = None
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: D = None
        self.u: E = None
        self.q: E = None
        self.x: G = None
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: I = None
        self.o: D = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: H = None
        self.v: F = None
        self.txt = txt

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

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