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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: E = None
        self.r: E = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: H = None
        self.r: F = None
        self.w: B = None
        self.s: F = None
        self.q: H = None
        self.o: G = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: H = None
        self.q: H = None
        self.w: B = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: E = None
        self.r: E = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: H = None
        self.r: F = None
        self.w: B = None
        self.s: F = None
        self.q: H = None
        self.o: G = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: H = None
        self.q: H = None
        self.w: B = None
        self.z: E = None
        self.txt = txt

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

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

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

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