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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: C = None
        self.v: H = None
        self.z: C = None
        self.x: D = None
        self.w: H = None
        self.q: C = None
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

n.z = b
b.v = g
k.p = b
e.w = d
e.u = k
g.r = k
g.y = k
g.z = k
g.q = k
g.v = a
g.w = a
g.o = a
g.x = e
d.q = e
d.s = e
d.y = e
d.v = e
d.o = a
c.p = b
a.w = c
a.p = g
a.y = g
a.u = b
a.s = b
assert n.z.v.v.p.x.w.o.u.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: C = None
        self.v: H = None
        self.z: C = None
        self.x: D = None
        self.w: H = None
        self.q: C = None
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

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