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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: E = None
        self.z: E = None
        self.t: F = None
        self.p: E = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: E = None
        self.z: E = None
        self.t: F = None
        self.p: E = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

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