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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: F = None
        self.s: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: F = None
        self.o: B = None
        self.p: D = None
        self.w: J = None
        self.y: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: B = None
        self.x: B = None
        self.p: J = None
        self.z: B = None
        self.q: D = None
        self.s: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: D = None
        self.q: C = None
        self.s: J = None
        self.p: G = None
        self.o: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: F = None
        self.s: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: F = None
        self.o: B = None
        self.p: D = None
        self.w: J = None
        self.y: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: B = None
        self.x: B = None
        self.p: J = None
        self.z: B = None
        self.q: D = None
        self.s: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: D = None
        self.q: C = None
        self.s: J = None
        self.p: G = None
        self.o: G = None
        self.txt = txt

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

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

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