class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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