class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: D = None
        self.x: E = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: C = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: B = None
        self.w: B = None
        self.s: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: D = None
        self.x: F = None
        self.q: C = None
        self.y: E = None
        self.z: E = None
        self.t: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: C = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: B = None
        self.w: B = None
        self.s: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: D = None
        self.x: F = None
        self.q: C = None
        self.y: E = None
        self.z: E = None
        self.t: F = None
        self.txt = txt

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

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