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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: B = None
        self.p: H = None
        self.w: E = None
        self.r: D = None
        self.s: B = None
        self.v: B = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: C = None
        self.p: C = None
        self.q: A = None
        self.t: E = None
        self.u: B = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: F = None
        self.p: A = None
        self.q: F = None
        self.x: C = None
        self.z: H = None
        self.txt = txt

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

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

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

k = A("k")
b = B("b")
m = C("m")
h = D("h")
e = E("e")
n = F("n")
c = G("c")
i = H("i")

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: B = None
        self.p: H = None
        self.w: E = None
        self.r: D = None
        self.s: B = None
        self.v: B = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: C = None
        self.p: C = None
        self.q: A = None
        self.t: E = None
        self.u: B = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: F = None
        self.p: A = None
        self.q: F = None
        self.x: C = None
        self.z: H = None
        self.txt = txt

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

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

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

k = A("k")
b = B("b")
m = C("m")
h = D("h")
e = E("e")
n = F("n")
c = G("c")
i = H("i")

k.s = n
k.w = h
k.v = b
b.r = k
b.z = k
b.w = n
m.y = b
m.o = b
m.s = b
m.v = b
m.p = i
m.w = e
m.r = h
m.u = k
h.y = m
h.w = m
h.p = m
h.v = m
h.q = k
h.t = e
h.u = b
e.u = b
e.y = n
e.q = n
e.p = k
e.x = m
e.z = i
n.s = c
c.t = n
c.o = i
i.v = b
i.q = m
assert h.v.s.w.txt == "n"