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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: C = None
        self.x: I = None
        self.o: I = None
        self.q: D = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: C = None
        self.x: I = None
        self.o: I = None
        self.q: D = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

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

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

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