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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: F = None
        self.t: F = None
        self.u: A = None
        self.z: D = None
        self.q: I = None
        self.x: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: J = None
        self.u: D = None
        self.t: C = None
        self.s: F = None
        self.p: B = None
        self.q: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: E = None
        self.q: E = None
        self.u: H = None
        self.y: I = None
        self.s: B = None
        self.t: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: B = None
        self.txt = txt

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

c = A("c")
i = B("i")
m = C("m")
b = D("b")
a = E("a")
j = F("j")
g = G("g")
d = H("d")
n = I("n")
l = J("l")

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: F = None
        self.t: F = None
        self.u: A = None
        self.z: D = None
        self.q: I = None
        self.x: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: J = None
        self.u: D = None
        self.t: C = None
        self.s: F = None
        self.p: B = None
        self.q: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: E = None
        self.q: E = None
        self.u: H = None
        self.y: I = None
        self.s: B = None
        self.t: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: B = None
        self.txt = txt

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

c = A("c")
i = B("i")
m = C("m")
b = D("b")
a = E("a")
j = F("j")
g = G("g")
d = H("d")
n = I("n")
l = J("l")

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