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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: D = None
        self.s: H = None
        self.p: D = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: E = None
        self.s: G = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: B = None
        self.o: H = None
        self.y: H = None
        self.w: H = None
        self.q: B = None
        self.p: D = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: D = None
        self.s: H = None
        self.p: D = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: E = None
        self.s: G = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: B = None
        self.o: H = None
        self.y: H = None
        self.w: H = None
        self.q: B = None
        self.p: D = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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