class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: J = None
        self.x: D = None
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: E = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: F = None
        self.r: D = None
        self.w: G = None
        self.v: J = None
        self.x: J = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: D = None
        self.v: G = None
        self.r: E = None
        self.o: J = None
        self.p: G = None
        self.x: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: E = None
        self.p: B = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: E = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: F = None
        self.r: D = None
        self.w: G = None
        self.v: J = None
        self.x: J = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: D = None
        self.v: G = None
        self.r: E = None
        self.o: J = None
        self.p: G = None
        self.x: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: E = None
        self.p: B = None
        self.x: C = None
        self.txt = txt

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

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

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

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