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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: A = None
        self.u: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.q: J = None
        self.t: B = None
        self.v: J = None
        self.r: E = None
        self.y: A = None
        self.z: B = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: I = None
        self.x: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

m = A("m")
h = B("h")
i = C("i")
f = D("f")
k = E("k")
e = F("e")
l = G("l")
a = H("a")
b = I("b")
c = J("c")

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: A = None
        self.u: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.q: J = None
        self.t: B = None
        self.v: J = None
        self.r: E = None
        self.y: A = None
        self.z: B = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: I = None
        self.x: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

m = A("m")
h = B("h")
i = C("i")
f = D("f")
k = E("k")
e = F("e")
l = G("l")
a = H("a")
b = I("b")
c = J("c")

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