class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: D = None
        self.u: E = None
        self.q: E = None
        self.t: G = None
        self.y: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.t: J = None
        self.u: H = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: B = None
        self.z: E = None
        self.u: B = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: E = None
        self.v: E = None
        self.w: A = None
        self.q: C = None
        self.txt = txt

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

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

b = A("b")
h = B("h")
d = C("d")
i = D("i")
m = E("m")
l = F("l")
f = G("f")
e = H("e")
k = I("k")
g = J("g")

b.x = d
b.y = d
b.r = i
b.u = m
b.q = m
b.t = f
h.x = e
h.p = e
h.o = g
h.y = m
h.q = l
h.s = f
h.z = f
h.u = f
d.u = m
d.x = m
d.r = m
d.t = m
d.p = m
d.o = h
d.v = i
d.q = i
d.s = g
d.w = l
i.o = f
i.p = m
i.u = b
m.x = e
m.t = e
m.p = k
m.y = k
m.q = k
m.z = i
m.v = f
m.s = f
m.r = d
m.u = d
l.o = g
l.t = g
l.u = e
l.r = b
f.p = h
f.y = h
f.u = h
f.z = m
f.v = e
e.r = d
e.q = d
e.x = m
e.v = m
e.w = b
k.r = d
g.w = f
g.p = m
g.v = k
assert d.s.p.s.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: D = None
        self.u: E = None
        self.q: E = None
        self.t: G = None
        self.y: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.t: J = None
        self.u: H = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: B = None
        self.z: E = None
        self.u: B = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: E = None
        self.v: E = None
        self.w: A = None
        self.q: C = None
        self.txt = txt

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

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

b = A("b")
h = B("h")
d = C("d")
i = D("i")
m = E("m")
l = F("l")
f = G("f")
e = H("e")
k = I("k")
g = J("g")

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