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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: B = None
        self.q: A = None
        self.w: F = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: B = None
        self.q: G = None
        self.txt = txt

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

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

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

j = A("j")
i = B("i")
d = C("d")
a = D("a")
h = E("h")
f = F("f")
m = G("m")
k = H("k")
e = H("e")

j.z = h
j.y = h
j.v = f
i.w = a
i.o = f
d.v = m
d.y = i
d.q = j
d.w = f
d.u = f
a.s = i
a.z = f
a.r = j
a.w = j
a.x = j
a.v = k
a.q = k
a.p = d
h.p = k
h.z = i
h.q = m
f.p = h
f.t = j
f.w = j
f.r = j
f.q = j
f.x = k
f.y = a
f.z = e
m.u = a
m.x = j
m.s = h
k.o = m
e.o = m
assert k.o.x.z.q.x.y.p.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: F = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: B = None
        self.q: A = None
        self.w: F = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: B = None
        self.q: G = None
        self.txt = txt

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

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

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

j = A("j")
i = B("i")
d = C("d")
a = D("a")
h = E("h")
f = F("f")
m = G("m")
k = H("k")
e = H("e")

j.z = h
j.y = h
j.v = f
i.w = a
i.o = f
d.v = m
d.y = i
d.q = j
d.w = f
d.u = f
a.s = i
a.z = f
a.r = j
a.w = j
a.x = j
a.v = k
a.q = k
a.p = d
h.p = k
h.z = i
h.q = m
f.p = h
f.t = j
f.w = j
f.r = j
f.q = j
f.x = k
f.y = a
f.z = e
m.u = a
m.x = j
m.s = h
k.o = m
e.o = m
assert k.o.x.z.q.x.y.p.o.s.txt == "h"