class A:
    def __init__(self, txt: str):
        self.p: J = None
        self.u: E = None
        self.y: H = None
        self.w: F = None
        self.o: J = None
        self.s: H = None
        self.r: J = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: G = None
        self.z: G = None
        self.r: D = None
        self.s: J = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: F = None
        self.v: A = None
        self.y: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: B = None
        self.v: C = None
        self.z: C = None
        self.s: C = None
        self.t: I = None
        self.o: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: G = None
        self.z: G = None
        self.r: D = None
        self.s: J = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: F = None
        self.v: A = None
        self.y: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: B = None
        self.v: C = None
        self.z: C = None
        self.s: C = None
        self.t: I = None
        self.o: A = None
        self.txt = txt

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

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