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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: G = None
        self.o: G = None
        self.v: E = None
        self.z: F = None
        self.w: C = None
        self.u: E = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: I = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: B = None
        self.p: G = None
        self.v: H = None
        self.o: F = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: D = None
        self.o: A = None
        self.x: H = None
        self.z: J = None
        self.s: E = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: G = None
        self.q: C = None
        self.x: I = None
        self.p: A = None
        self.s: G = None
        self.v: G = None
        self.u: C = None
        self.r: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: F = None
        self.t: C = None
        self.z: C = None
        self.w: F = None
        self.v: H = None
        self.p: H = None
        self.o: B = None
        self.q: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: G = None
        self.o: G = None
        self.v: E = None
        self.z: F = None
        self.w: C = None
        self.u: E = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: I = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: B = None
        self.p: G = None
        self.v: H = None
        self.o: F = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: D = None
        self.o: A = None
        self.x: H = None
        self.z: J = None
        self.s: E = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: G = None
        self.q: C = None
        self.x: I = None
        self.p: A = None
        self.s: G = None
        self.v: G = None
        self.u: C = None
        self.r: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: F = None
        self.t: C = None
        self.z: C = None
        self.w: F = None
        self.v: H = None
        self.p: H = None
        self.o: B = None
        self.q: C = None
        self.txt = txt

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

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