class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: D = None
        self.z: G = None
        self.t: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: F = None
        self.q: C = None
        self.z: F = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: H = None
        self.v: B = None
        self.t: C = None
        self.y: C = None
        self.o: B = None
        self.x: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: D = None
        self.z: G = None
        self.t: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: F = None
        self.q: C = None
        self.z: F = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: H = None
        self.v: B = None
        self.t: C = None
        self.y: C = None
        self.o: B = None
        self.x: E = None
        self.txt = txt

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

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