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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: E = None
        self.y: C = None
        self.p: A = None
        self.r: G = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: A = None
        self.y: B = None
        self.x: F = None
        self.s: G = None
        self.u: F = None
        self.o: B = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: B = None
        self.x: E = None
        self.t: A = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: E = None
        self.v: D = None
        self.t: G = None
        self.y: B = None
        self.w: F = None
        self.p: E = None
        self.txt = txt

c = A("c")
m = B("m")
f = C("f")
k = D("k")
d = E("d")
i = F("i")
n = G("n")
a = H("a")

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: E = None
        self.y: C = None
        self.p: A = None
        self.r: G = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: A = None
        self.y: B = None
        self.x: F = None
        self.s: G = None
        self.u: F = None
        self.o: B = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: B = None
        self.x: E = None
        self.t: A = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: E = None
        self.v: D = None
        self.t: G = None
        self.y: B = None
        self.w: F = None
        self.p: E = None
        self.txt = txt

c = A("c")
m = B("m")
f = C("f")
k = D("k")
d = E("d")
i = F("i")
n = G("n")
a = H("a")

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