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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: J = None
        self.x: D = None
        self.q: I = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: I = None
        self.r: E = None
        self.v: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: J = None
        self.x: D = None
        self.q: I = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: I = None
        self.r: E = None
        self.v: I = None
        self.txt = txt

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

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

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

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