class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: J = None
        self.w: A = None
        self.q: G = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: D = None
        self.y: D = None
        self.t: B = None
        self.r: G = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.p: J = None
        self.z: G = None
        self.q: G = None
        self.r: H = None
        self.x: B = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: B = None
        self.y: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: J = None
        self.w: A = None
        self.q: G = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: D = None
        self.y: D = None
        self.t: B = None
        self.r: G = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.p: J = None
        self.z: G = None
        self.q: G = None
        self.r: H = None
        self.x: B = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: B = None
        self.y: F = None
        self.txt = txt

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

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

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