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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: J = None
        self.v: A = None
        self.s: B = None
        self.p: B = None
        self.x: F = None
        self.u: B = None
        self.o: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: C = None
        self.o: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: J = None
        self.v: A = None
        self.s: B = None
        self.p: B = None
        self.x: F = None
        self.u: B = None
        self.o: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: C = None
        self.o: D = None
        self.txt = txt

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

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