class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: G = None
        self.v: E = None
        self.r: D = None
        self.s: E = None
        self.u: C = None
        self.t: H = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: G = None
        self.v: E = None
        self.r: D = None
        self.s: E = None
        self.u: C = None
        self.t: H = None
        self.w: E = None
        self.txt = txt

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

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

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

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