class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: A = None
        self.s: E = None
        self.o: J = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: F = None
        self.x: A = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: I = None
        self.r: J = None
        self.q: B = None
        self.y: B = None
        self.o: I = None
        self.s: D = None
        self.w: J = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.z: C = None
        self.w: E = None
        self.x: J = None
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: C = None
        self.q: G = None
        self.y: H = None
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: A = None
        self.s: E = None
        self.o: J = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: F = None
        self.x: A = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: I = None
        self.r: J = None
        self.q: B = None
        self.y: B = None
        self.o: I = None
        self.s: D = None
        self.w: J = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.z: C = None
        self.w: E = None
        self.x: J = None
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: C = None
        self.q: G = None
        self.y: H = None
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: A = None
        self.txt = txt

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

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