class A:
    def __init__(self, txt: str):
        self.p: J = None
        self.s: B = None
        self.r: J = None
        self.x: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: J = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: J = None
        self.x: C = None
        self.v: J = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: E = None
        self.q: C = None
        self.w: F = None
        self.s: D = None
        self.v: D = None
        self.z: D = None
        self.y: E = None
        self.p: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: J = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: J = None
        self.x: C = None
        self.v: J = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: E = None
        self.q: C = None
        self.w: F = None
        self.s: D = None
        self.v: D = None
        self.z: D = None
        self.y: E = None
        self.p: C = None
        self.txt = txt

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

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