class A:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: F = None
        self.u: H = None
        self.q: B = None
        self.y: A = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: C = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: F = None
        self.u: H = None
        self.q: B = None
        self.y: A = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: C = None
        self.o: C = None
        self.txt = txt

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

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

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