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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: J = None
        self.r: G = None
        self.z: B = None
        self.q: A = None
        self.v: B = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: C = None
        self.z: J = None
        self.w: D = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: A = None
        self.v: I = None
        self.s: G = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: J = None
        self.r: G = None
        self.z: B = None
        self.q: A = None
        self.v: B = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: C = None
        self.z: J = None
        self.w: D = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: A = None
        self.v: I = None
        self.s: G = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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