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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: F = None
        self.r: F = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: G = None
        self.u: C = None
        self.o: H = None
        self.v: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: C = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: F = None
        self.r: F = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: G = None
        self.u: C = None
        self.o: H = None
        self.v: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: C = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: G = None
        self.txt = txt

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

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

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