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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: F = None
        self.o: D = None
        self.z: J = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.q: B = None
        self.p: H = None
        self.s: B = None
        self.t: H = None
        self.x: D = None
        self.z: J = None
        self.v: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: B = None
        self.v: D = None
        self.z: F = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: F = None
        self.o: G = None
        self.r: I = None
        self.x: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: F = None
        self.o: D = None
        self.z: J = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.q: B = None
        self.p: H = None
        self.s: B = None
        self.t: H = None
        self.x: D = None
        self.z: J = None
        self.v: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: B = None
        self.v: D = None
        self.z: F = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: F = None
        self.o: G = None
        self.r: I = None
        self.x: E = None
        self.txt = txt

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

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