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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: G = None
        self.y: J = None
        self.w: A = None
        self.t: A = None
        self.q: H = None
        self.p: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: G = None
        self.y: J = None
        self.w: A = None
        self.t: A = None
        self.q: H = None
        self.p: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: H = None
        self.txt = txt

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

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

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