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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: A = None
        self.t: B = None
        self.x: A = None
        self.r: A = None
        self.z: I = None
        self.q: A = None
        self.w: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: I = None
        self.u: E = None
        self.t: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: H = None
        self.o: H = None
        self.r: H = None
        self.z: C = None
        self.txt = txt

h = A("h")
b = B("b")
f = C("f")
j = D("j")
e = E("e")
g = F("g")
m = G("m")
a = H("a")
i = I("i")
n = D("n")

h.v = b
b.x = a
f.s = a
f.p = h
f.x = h
f.r = h
f.q = h
f.t = b
f.z = i
f.w = i
j.s = i
j.x = m
j.z = b
j.v = b
j.p = e
j.w = e
j.o = h
j.r = n
e.x = m
e.u = j
g.v = a
g.s = i
g.u = e
g.t = h
m.y = i
m.u = b
a.x = h
a.q = g
a.u = n
a.s = n
a.o = e
a.v = f
i.q = a
i.y = a
i.o = a
i.r = a
i.z = f
n.s = i
n.x = m
n.z = b
n.v = b
n.p = e
n.w = e
n.o = h
n.r = j
assert e.x.y.z.w.y.q.s.z.s.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: A = None
        self.t: B = None
        self.x: A = None
        self.r: A = None
        self.z: I = None
        self.q: A = None
        self.w: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: I = None
        self.u: E = None
        self.t: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: H = None
        self.o: H = None
        self.r: H = None
        self.z: C = None
        self.txt = txt

h = A("h")
b = B("b")
f = C("f")
j = D("j")
e = E("e")
g = F("g")
m = G("m")
a = H("a")
i = I("i")
n = D("n")

h.v = b
b.x = a
f.s = a
f.p = h
f.x = h
f.r = h
f.q = h
f.t = b
f.z = i
f.w = i
j.s = i
j.x = m
j.z = b
j.v = b
j.p = e
j.w = e
j.o = h
j.r = n
e.x = m
e.u = j
g.v = a
g.s = i
g.u = e
g.t = h
m.y = i
m.u = b
a.x = h
a.q = g
a.u = n
a.s = n
a.o = e
a.v = f
i.q = a
i.y = a
i.o = a
i.r = a
i.z = f
n.s = i
n.x = m
n.z = b
n.v = b
n.p = e
n.w = e
n.o = h
n.r = j
assert e.x.y.z.w.y.q.s.z.s.txt == "a"