class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: H = None
        self.o: I = None
        self.u: E = None
        self.w: F = None
        self.s: B = None
        self.r: C = None
        self.z: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: E = None
        self.y: E = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: C = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: E = None
        self.w: J = None
        self.z: H = None
        self.p: C = None
        self.y: I = None
        self.u: F = None
        self.x: H = None
        self.s: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: J = None
        self.z: D = None
        self.o: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: A = None
        self.x: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: E = None
        self.y: E = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: C = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: E = None
        self.w: J = None
        self.z: H = None
        self.p: C = None
        self.y: I = None
        self.u: F = None
        self.x: H = None
        self.s: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: J = None
        self.z: D = None
        self.o: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: A = None
        self.x: E = None
        self.txt = txt

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

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