class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: H = None
        self.o: G = None
        self.w: B = None
        self.y: D = None
        self.p: F = None
        self.t: D = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

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

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