class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: D = None
        self.p: B = None
        self.q: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: D = None
        self.s: D = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: G = None
        self.z: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: F = None
        self.r: E = None
        self.y: I = None
        self.q: G = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: D = None
        self.s: D = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: G = None
        self.z: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: F = None
        self.r: E = None
        self.y: I = None
        self.q: G = None
        self.v: E = None
        self.txt = txt

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

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

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