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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: F = None
        self.p: E = None
        self.w: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: A = None
        self.y: H = None
        self.p: A = None
        self.q: E = None
        self.z: A = None
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: C = None
        self.s: B = None
        self.t: B = None
        self.r: F = None
        self.p: F = None
        self.o: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: F = None
        self.p: E = None
        self.w: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: A = None
        self.y: H = None
        self.p: A = None
        self.q: E = None
        self.z: A = None
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: C = None
        self.s: B = None
        self.t: B = None
        self.r: F = None
        self.p: F = None
        self.o: E = None
        self.txt = txt

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

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