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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: F = None
        self.s: C = None
        self.u: H = None
        self.r: I = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: F = None
        self.s: G = None
        self.p: D = None
        self.q: I = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.q: J = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: B = None
        self.v: H = None
        self.r: D = None
        self.y: J = None
        self.o: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: D = None
        self.s: J = None
        self.x: G = None
        self.u: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: F = None
        self.u: B = None
        self.v: C = None
        self.y: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: F = None
        self.s: C = None
        self.u: H = None
        self.r: I = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: F = None
        self.s: G = None
        self.p: D = None
        self.q: I = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.q: J = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: B = None
        self.v: H = None
        self.r: D = None
        self.y: J = None
        self.o: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: D = None
        self.s: J = None
        self.x: G = None
        self.u: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: F = None
        self.u: B = None
        self.v: C = None
        self.y: I = None
        self.txt = txt

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

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