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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: J = None
        self.z: E = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: E = None
        self.x: J = None
        self.s: A = None
        self.w: E = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: C = None
        self.w: J = None
        self.v: H = None
        self.z: H = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: J = None
        self.z: E = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: E = None
        self.x: J = None
        self.s: A = None
        self.w: E = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: C = None
        self.w: J = None
        self.v: H = None
        self.z: H = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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

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