class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: H = None
        self.r: F = None
        self.p: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: A = None
        self.y: A = None
        self.w: F = None
        self.z: A = None
        self.t: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: A = None
        self.p: C = None
        self.o: G = None
        self.s: D = None
        self.r: F = None
        self.t: D = None
        self.x: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: I = None
        self.w: F = None
        self.v: G = None
        self.t: A = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: A = None
        self.y: A = None
        self.w: F = None
        self.z: A = None
        self.t: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: A = None
        self.p: C = None
        self.o: G = None
        self.s: D = None
        self.r: F = None
        self.t: D = None
        self.x: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: I = None
        self.w: F = None
        self.v: G = None
        self.t: A = None
        self.z: I = None
        self.txt = txt

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

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