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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: C = None
        self.q: D = None
        self.z: F = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: F = None
        self.s: B = None
        self.y: B = None
        self.z: F = None
        self.o: C = None
        self.w: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: H = None
        self.t: J = None
        self.z: E = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: C = None
        self.q: D = None
        self.z: F = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: F = None
        self.s: B = None
        self.y: B = None
        self.z: F = None
        self.o: C = None
        self.w: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: H = None
        self.t: J = None
        self.z: E = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

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