class A:
    def __init__(self, txt: str):
        self.w: F = 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.x: F = None
        self.u: H = None
        self.t: G = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: C = None
        self.z: A = None
        self.txt = txt

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

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

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

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

f.w = g
m.v = k
b.x = g
b.u = i
b.t = n
b.z = f
c.x = m
c.u = f
c.t = b
k.y = h
k.x = b
k.z = f
g.s = i
g.r = f
n.z = f
n.t = b
n.r = b
n.p = b
n.y = c
n.u = h
i.w = m
i.x = m
i.v = m
i.t = g
i.q = n
i.o = k
i.u = f
i.y = h
h.y = k
h.x = b
h.z = f
d.w = m
d.x = m
d.v = m
d.t = g
d.q = n
d.o = k
d.y = k
d.u = f
assert n.y.t.x.r.w.s.q.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = 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.x: F = None
        self.u: H = None
        self.t: G = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: C = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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