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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: E = None
        self.z: B = None
        self.v: H = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: F = None
        self.o: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: F = None
        self.y: A = None
        self.r: D = None
        self.p: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: E = None
        self.z: B = None
        self.v: H = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: F = None
        self.o: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: F = None
        self.y: A = None
        self.r: D = None
        self.p: F = None
        self.txt = txt

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

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