class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: D = None
        self.w: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: J = None
        self.y: B = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: J = None
        self.w: C = None
        self.y: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: G = None
        self.u: H = None
        self.y: B = None
        self.s: G = None
        self.w: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: H = None
        self.w: D = None
        self.q: H = None
        self.o: E = None
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: D = None
        self.w: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: J = None
        self.y: B = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: J = None
        self.w: C = None
        self.y: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: G = None
        self.u: H = None
        self.y: B = None
        self.s: G = None
        self.w: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: H = None
        self.w: D = None
        self.q: H = None
        self.o: E = None
        self.y: B = None
        self.txt = txt

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

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