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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: A = None
        self.x: H = None
        self.q: H = None
        self.s: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: D = None
        self.p: D = None
        self.v: B = None
        self.x: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.y: I = None
        self.v: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: D = None
        self.y: F = None
        self.w: D = None
        self.x: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: A = None
        self.x: H = None
        self.q: H = None
        self.s: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: D = None
        self.p: D = None
        self.v: B = None
        self.x: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.y: I = None
        self.v: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: D = None
        self.y: F = None
        self.w: D = None
        self.x: D = None
        self.txt = txt

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

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