class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: C = None
        self.y: H = None
        self.w: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: H = None
        self.w: J = None
        self.p: J = None
        self.x: F = None
        self.y: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: A = None
        self.z: A = None
        self.o: E = None
        self.u: A = None
        self.p: J = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: H = None
        self.w: J = None
        self.p: J = None
        self.x: F = None
        self.y: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: A = None
        self.z: A = None
        self.o: E = None
        self.u: A = None
        self.p: J = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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