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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: F = None
        self.o: A = None
        self.v: G = None
        self.r: A = None
        self.t: J = None
        self.w: A = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: F = None
        self.u: G = None
        self.y: F = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: F = None
        self.y: B = None
        self.p: C = None
        self.t: H = None
        self.w: H = None
        self.r: C = None
        self.z: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: F = None
        self.o: A = None
        self.v: G = None
        self.r: A = None
        self.t: J = None
        self.w: A = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: F = None
        self.u: G = None
        self.y: F = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: F = None
        self.y: B = None
        self.p: C = None
        self.t: H = None
        self.w: H = None
        self.r: C = None
        self.z: H = None
        self.txt = txt

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

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

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