class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: F = None
        self.t: I = None
        self.s: D = None
        self.z: E = None
        self.p: C = None
        self.x: I = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: I = None
        self.y: D = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: C = None
        self.z: G = None
        self.r: A = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: E = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: B = None
        self.o: D = None
        self.w: E = None
        self.x: F = None
        self.z: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: I = None
        self.y: D = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: C = None
        self.z: G = None
        self.r: A = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: E = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: B = None
        self.o: D = None
        self.w: E = None
        self.x: F = None
        self.z: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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