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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: D = None
        self.q: F = None
        self.x: G = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: G = None
        self.x: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: C = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: A = None
        self.o: I = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: E = None
        self.q: D = None
        self.y: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: F = None
        self.u: D = None
        self.r: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: D = None
        self.q: F = None
        self.x: G = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: G = None
        self.x: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: C = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: A = None
        self.o: I = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: E = None
        self.q: D = None
        self.y: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: F = None
        self.u: D = None
        self.r: I = None
        self.txt = txt

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

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