class A:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: B = None
        self.y: F = None
        self.q: F = None
        self.r: G = None
        self.o: D = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: F = None
        self.y: A = None
        self.r: F = None
        self.w: G = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: H = None
        self.z: B = None
        self.y: G = None
        self.s: F = None
        self.q: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

g.t = j
g.s = b
g.y = m
g.q = m
g.z = m
g.r = a
g.o = h
b.u = j
f.q = l
f.t = a
h.x = d
h.v = m
h.r = m
h.y = g
h.w = a
d.q = l
m.r = h
m.o = j
a.x = l
a.w = l
a.r = l
a.v = l
a.t = l
a.o = g
a.s = g
a.u = h
a.z = h
a.p = e
l.s = m
l.x = d
e.o = f
e.p = l
e.z = b
e.y = a
e.s = m
e.q = h
j.r = l
assert j.r.s.r.y.z.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: B = None
        self.y: F = None
        self.q: F = None
        self.r: G = None
        self.o: D = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: F = None
        self.y: A = None
        self.r: F = None
        self.w: G = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: H = None
        self.z: B = None
        self.y: G = None
        self.s: F = None
        self.q: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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