class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: C = None
        self.u: B = None
        self.y: I = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: H = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: E = None
        self.z: E = None
        self.o: E = None
        self.v: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: E = None
        self.y: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: H = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: E = None
        self.z: E = None
        self.o: E = None
        self.v: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: E = None
        self.y: A = None
        self.txt = txt

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

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

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