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

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

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: F = None
        self.q: I = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: E = None
        self.z: G = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: H = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: B = None
        self.q: I = None
        self.y: I = None
        self.x: D = None
        self.v: D = None
        self.s: A = None
        self.p: I = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: H = None
        self.v: D = None
        self.p: C = None
        self.t: H = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: F = None
        self.q: I = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: E = None
        self.z: G = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: H = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: B = None
        self.q: I = None
        self.y: I = None
        self.x: D = None
        self.v: D = None
        self.s: A = None
        self.p: I = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: H = None
        self.v: D = None
        self.p: C = None
        self.t: H = None
        self.o: C = None
        self.txt = txt

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

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