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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: D = None
        self.x: G = None
        self.t: J = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: G = None
        self.t: H = None
        self.v: G = None
        self.z: I = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: D = None
        self.x: G = None
        self.t: J = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: G = None
        self.t: H = None
        self.v: G = None
        self.z: I = None
        self.s: F = None
        self.txt = txt

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

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