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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: E = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: E = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: A = None
        self.txt = txt

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

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

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