class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.z: A = None
        self.x: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: H = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.x: I = None
        self.w: B = None
        self.s: A = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: D = None
        self.q: A = None
        self.z: F = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: G = None
        self.q: D = None
        self.w: B = None
        self.u: G = None
        self.o: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.z: A = None
        self.x: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: H = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.x: I = None
        self.w: B = None
        self.s: A = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: D = None
        self.q: A = None
        self.z: F = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: G = None
        self.q: D = None
        self.w: B = None
        self.u: G = None
        self.o: G = None
        self.txt = txt

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

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

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

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