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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: A = None
        self.q: A = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: E = None
        self.o: I = None
        self.s: A = None
        self.x: C = None
        self.t: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: A = None
        self.q: A = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: E = None
        self.o: I = None
        self.s: A = None
        self.x: C = None
        self.t: G = None
        self.txt = txt

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

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