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

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

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

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.o: J = None
        self.q: A = None
        self.y: E = None
        self.r: G = None
        self.v: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: A = None
        self.w: A = None
        self.q: A = None
        self.s: G = None
        self.x: C = None
        self.z: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: D = None
        self.y: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: H = None
        self.s: G = None
        self.v: C = None
        self.x: D = None
        self.z: E = None
        self.r: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.o: J = None
        self.q: A = None
        self.y: E = None
        self.r: G = None
        self.v: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: A = None
        self.w: A = None
        self.q: A = None
        self.s: G = None
        self.x: C = None
        self.z: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: D = None
        self.y: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: H = None
        self.s: G = None
        self.v: C = None
        self.x: D = None
        self.z: E = None
        self.r: H = None
        self.txt = txt

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

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