class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: J = None
        self.y: G = None
        self.p: E = None
        self.s: B = None
        self.u: B = None
        self.v: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: D = None
        self.s: C = None
        self.z: C = None
        self.x: B = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: G = None
        self.z: J = None
        self.p: J = None
        self.y: G = None
        self.s: E = None
        self.w: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: J = None
        self.y: G = None
        self.p: E = None
        self.s: B = None
        self.u: B = None
        self.v: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: D = None
        self.s: C = None
        self.z: C = None
        self.x: B = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: G = None
        self.z: J = None
        self.p: J = None
        self.y: G = None
        self.s: E = None
        self.w: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: D = None
        self.txt = txt

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

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