class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: J = None
        self.p: I = None
        self.y: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: C = None
        self.s: D = None
        self.o: D = None
        self.r: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: A = None
        self.y: D = None
        self.r: G = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: A = None
        self.q: E = None
        self.p: H = None
        self.s: I = None
        self.t: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.p: E = None
        self.r: J = None
        self.u: C = None
        self.t: F = None
        self.o: D = None
        self.q: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: C = None
        self.s: D = None
        self.o: D = None
        self.r: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: A = None
        self.y: D = None
        self.r: G = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: A = None
        self.q: E = None
        self.p: H = None
        self.s: I = None
        self.t: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.p: E = None
        self.r: J = None
        self.u: C = None
        self.t: F = None
        self.o: D = None
        self.q: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: C = None
        self.txt = txt

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

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