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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.v: I = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: D = None
        self.z: B = None
        self.p: H = None
        self.r: F = None
        self.x: J = None
        self.y: I = None
        self.q: F = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: D = None
        self.p: D = None
        self.v: B = None
        self.r: B = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: E = None
        self.v: G = None
        self.q: C = None
        self.y: J = None
        self.r: G = None
        self.t: A = None
        self.u: I = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.v: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: D = None
        self.y: D = None
        self.t: D = None
        self.s: F = None
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.v: I = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: D = None
        self.z: B = None
        self.p: H = None
        self.r: F = None
        self.x: J = None
        self.y: I = None
        self.q: F = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: D = None
        self.p: D = None
        self.v: B = None
        self.r: B = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: E = None
        self.v: G = None
        self.q: C = None
        self.y: J = None
        self.r: G = None
        self.t: A = None
        self.u: I = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.v: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: D = None
        self.y: D = None
        self.t: D = None
        self.s: F = None
        self.o: G = None
        self.txt = txt

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

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