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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: B = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: B = None
        self.o: D = None
        self.txt = txt

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

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

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