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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: G = None
        self.s: F = None
        self.r: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: G = None
        self.s: F = None
        self.r: F = None
        self.txt = txt

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

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