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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: F = None
        self.y: C = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: B = None
        self.t: F = None
        self.y: J = None
        self.u: E = None
        self.v: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: C = None
        self.r: C = None
        self.v: J = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: D = None
        self.w: B = None
        self.v: E = None
        self.y: D = None
        self.q: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: I = None
        self.v: E = None
        self.t: F = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: J = None
        self.p: J = None
        self.r: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: F = None
        self.y: F = None
        self.s: E = None
        self.v: F = None
        self.x: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: F = None
        self.y: C = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: B = None
        self.t: F = None
        self.y: J = None
        self.u: E = None
        self.v: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: C = None
        self.r: C = None
        self.v: J = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: D = None
        self.w: B = None
        self.v: E = None
        self.y: D = None
        self.q: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: I = None
        self.v: E = None
        self.t: F = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: J = None
        self.p: J = None
        self.r: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: F = None
        self.y: F = None
        self.s: E = None
        self.v: F = None
        self.x: E = None
        self.txt = txt

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

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