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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: B = None
        self.o: H = None
        self.q: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: E = None
        self.txt = txt

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

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

d = A("d")
g = B("g")
b = C("b")
i = D("i")
n = E("n")
l = F("l")
j = G("j")
m = H("m")
f = G("f")

d.z = g
d.x = j
g.q = m
g.z = m
b.z = d
b.q = d
b.x = g
b.o = m
i.y = b
i.r = b
i.v = d
i.s = m
i.x = f
n.x = b
n.w = b
n.s = b
n.u = g
n.r = d
n.o = d
n.z = f
n.v = i
l.t = i
l.v = n
j.q = n
j.s = n
j.o = d
j.y = l
j.p = l
j.x = f
m.s = d
m.u = g
m.w = n
f.q = n
f.s = n
f.o = d
f.y = l
f.p = l
f.x = j
assert m.u.q.w.u.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: B = None
        self.o: H = None
        self.q: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: E = None
        self.txt = txt

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

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

d = A("d")
g = B("g")
b = C("b")
i = D("i")
n = E("n")
l = F("l")
j = G("j")
m = H("m")
f = G("f")

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