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

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: A = None
        self.u: A = None
        self.t: A = None
        self.v: G = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

n = A("n")
e = B("e")
b = C("b")
f = D("f")
m = E("m")
l = F("l")
g = G("g")
d = H("d")
k = C("k")
h = B("h")

n.z = f
e.o = h
e.y = h
b.z = l
b.y = n
b.u = n
b.t = n
b.v = g
b.p = e
f.z = m
f.y = l
f.o = b
f.x = d
f.s = k
m.p = f
m.v = n
l.s = n
l.v = f
l.x = e
g.w = e
g.p = n
g.x = n
g.u = d
g.t = l
g.z = k
d.v = g
d.s = n
d.x = k
k.z = l
k.y = n
k.u = n
k.t = n
k.v = g
k.p = h
h.o = e
h.y = e
assert h.o.o.o.y.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: A = None
        self.u: A = None
        self.t: A = None
        self.v: G = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

n = A("n")
e = B("e")
b = C("b")
f = D("f")
m = E("m")
l = F("l")
g = G("g")
d = H("d")
k = C("k")
h = B("h")

n.z = f
e.o = h
e.y = h
b.z = l
b.y = n
b.u = n
b.t = n
b.v = g
b.p = e
f.z = m
f.y = l
f.o = b
f.x = d
f.s = k
m.p = f
m.v = n
l.s = n
l.v = f
l.x = e
g.w = e
g.p = n
g.x = n
g.u = d
g.t = l
g.z = k
d.v = g
d.s = n
d.x = k
k.z = l
k.y = n
k.u = n
k.t = n
k.v = g
k.p = h
h.o = e
h.y = e
assert h.o.o.o.y.o.txt == "e"