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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: H = None
        self.y: I = None
        self.q: D = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: F = None
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: C = None
        self.o: H = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: G = None
        self.t: C = None
        self.x: A = None
        self.w: F = None
        self.v: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: H = None
        self.y: I = None
        self.q: D = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: F = None
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: C = None
        self.o: H = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: G = None
        self.t: C = None
        self.x: A = None
        self.w: F = None
        self.v: C = None
        self.txt = txt

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

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

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

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