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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: E = None
        self.q: I = None
        self.z: E = None
        self.w: B = None
        self.v: I = None
        self.s: A = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: A = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: G = None
        self.q: J = None
        self.w: J = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: J = None
        self.x: H = None
        self.w: C = None
        self.o: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: E = None
        self.q: I = None
        self.z: E = None
        self.w: B = None
        self.v: I = None
        self.s: A = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: A = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: G = None
        self.q: J = None
        self.w: J = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: J = None
        self.x: H = None
        self.w: C = None
        self.o: C = None
        self.txt = txt

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

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

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