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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: J = None
        self.z: H = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: I = None
        self.p: H = None
        self.s: D = None
        self.v: J = None
        self.z: G = None
        self.x: B = None
        self.q: B = None
        self.o: D = None
        self.r: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.s: I = None
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: C = None
        self.v: C = None
        self.o: J = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: J = None
        self.z: H = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: I = None
        self.p: H = None
        self.s: D = None
        self.v: J = None
        self.z: G = None
        self.x: B = None
        self.q: B = None
        self.o: D = None
        self.r: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.s: I = None
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: C = None
        self.v: C = None
        self.o: J = None
        self.txt = txt

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

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

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

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

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