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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: F = None
        self.p: B = None
        self.o: B = None
        self.t: A = None
        self.s: H = None
        self.z: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: D = None
        self.z: F = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: F = None
        self.p: B = None
        self.o: B = None
        self.t: A = None
        self.s: H = None
        self.z: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: D = None
        self.z: F = None
        self.s: A = None
        self.txt = txt

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

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