class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: E = None
        self.s: B = None
        self.o: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: J = None
        self.v: E = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: B = None
        self.z: D = None
        self.q: B = None
        self.r: A = None
        self.p: B = None
        self.v: F = None
        self.s: D = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: B = None
        self.y: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: E = None
        self.y: C = None
        self.w: B = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: A = None
        self.o: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: I = None
        self.v: I = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: J = None
        self.v: E = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: B = None
        self.z: D = None
        self.q: B = None
        self.r: A = None
        self.p: B = None
        self.v: F = None
        self.s: D = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: B = None
        self.y: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: E = None
        self.y: C = None
        self.w: B = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: A = None
        self.o: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: I = None
        self.v: I = None
        self.txt = txt

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

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