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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: B = None
        self.w: D = None
        self.r: E = None
        self.z: I = None
        self.p: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: B = None
        self.u: E = None
        self.r: A = None
        self.p: D = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: B = None
        self.w: D = None
        self.r: E = None
        self.z: I = None
        self.p: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: B = None
        self.u: E = None
        self.r: A = None
        self.p: D = None
        self.w: A = None
        self.txt = txt

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

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