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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: G = None
        self.r: H = None
        self.s: G = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: F = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: I = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: A = None
        self.y: J = None
        self.q: E = None
        self.r: C = None
        self.z: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: A = None
        self.s: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: G = None
        self.r: H = None
        self.s: G = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: F = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: I = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: A = None
        self.y: J = None
        self.q: E = None
        self.r: C = None
        self.z: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: A = None
        self.s: G = None
        self.txt = txt

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

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

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