class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: D = None
        self.s: I = None
        self.p: G = None
        self.x: B = None
        self.t: C = None
        self.y: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: I = None
        self.p: F = None
        self.z: F = None
        self.o: F = None
        self.w: H = None
        self.y: H = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: J = None
        self.t: A = None
        self.o: C = None
        self.r: G = None
        self.q: J = None
        self.w: J = None
        self.v: C = None
        self.s: I = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: D = None
        self.o: B = None
        self.q: B = None
        self.v: J = None
        self.x: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: I = None
        self.p: F = None
        self.z: F = None
        self.o: F = None
        self.w: H = None
        self.y: H = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: J = None
        self.t: A = None
        self.o: C = None
        self.r: G = None
        self.q: J = None
        self.w: J = None
        self.v: C = None
        self.s: I = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: D = None
        self.o: B = None
        self.q: B = None
        self.v: J = None
        self.x: H = None
        self.txt = txt

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

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

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