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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: F = None
        self.x: J = None
        self.z: C = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: C = None
        self.w: E = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: B = None
        self.s: E = None
        self.r: A = None
        self.v: E = None
        self.o: A = None
        self.p: I = None
        self.q: E = None
        self.y: A = None
        self.u: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: C = None
        self.y: E = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: F = None
        self.x: J = None
        self.z: C = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: C = None
        self.w: E = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: B = None
        self.s: E = None
        self.r: A = None
        self.v: E = None
        self.o: A = None
        self.p: I = None
        self.q: E = None
        self.y: A = None
        self.u: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: C = None
        self.y: E = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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