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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: G = None
        self.u: I = None
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.w: C = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: B = None
        self.t: B = None
        self.u: D = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: H = None
        self.t: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: G = None
        self.u: I = None
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.w: C = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: B = None
        self.t: B = None
        self.u: D = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: H = None
        self.t: B = None
        self.txt = txt

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

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