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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: E = None
        self.u: A = None
        self.t: E = None
        self.q: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: E = None
        self.w: E = None
        self.q: D = None
        self.o: D = None
        self.r: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: C = None
        self.q: F = None
        self.p: C = None
        self.y: D = None
        self.u: H = None
        self.o: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: E = None
        self.u: A = None
        self.t: E = None
        self.q: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: E = None
        self.w: E = None
        self.q: D = None
        self.o: D = None
        self.r: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: C = None
        self.q: F = None
        self.p: C = None
        self.y: D = None
        self.u: H = None
        self.o: F = None
        self.txt = txt

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

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