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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: C = None
        self.z: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: C = None
        self.p: F = None
        self.r: F = None
        self.t: E = None
        self.x: C = None
        self.s: F = None
        self.txt = txt

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

e = A("e")
d = B("d")
n = C("n")
c = D("c")
a = E("a")
k = F("k")
i = G("i")
f = H("f")

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: C = None
        self.z: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: C = None
        self.p: F = None
        self.r: F = None
        self.t: E = None
        self.x: C = None
        self.s: F = None
        self.txt = txt

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

e = A("e")
d = B("d")
n = C("n")
c = D("c")
a = E("a")
k = F("k")
i = G("i")
f = H("f")

e.v = n
e.t = f
e.z = c
e.o = a
e.s = a
d.w = n
d.t = n
d.z = i
n.o = e
n.q = e
c.u = d
c.y = n
a.u = d
a.r = d
a.o = e
a.z = f
a.q = f
a.t = n
a.y = n
k.v = f
i.o = d
i.v = n
i.x = n
i.p = k
i.r = k
i.s = k
i.t = a
f.z = c
assert c.u.w.o.t.z.y.txt == "n"