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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: I = None
        self.w: G = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.w: J = None
        self.p: H = None
        self.y: H = None
        self.z: B = None
        self.s: B = None
        self.x: F = None
        self.t: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: D = None
        self.q: G = None
        self.r: C = None
        self.p: C = None
        self.s: H = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: I = None
        self.w: G = None
        self.x: C = None
        self.o: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: F = None
        self.v: A = None
        self.s: E = None
        self.r: F = None
        self.txt = txt

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

k.v = j
k.w = j
k.z = h
k.q = b
k.y = i
f.p = c
f.u = c
f.w = g
f.y = j
j.q = b
j.w = b
j.p = l
j.y = l
j.z = f
j.s = f
j.x = h
j.t = g
d.z = f
d.p = j
d.v = b
i.t = g
i.q = g
i.u = d
i.r = j
i.p = j
i.s = l
i.y = l
h.x = c
h.q = d
g.z = k
g.y = c
g.t = c
g.x = l
g.u = l
g.w = f
g.r = h
l.v = j
l.x = j
l.o = j
l.s = c
l.w = g
c.u = i
c.q = f
c.v = l
c.z = j
c.y = g
b.t = j
b.p = h
b.r = h
b.v = k
b.s = i
assert k.y.t.x.s.q.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: F = None
        self.w: C = None
        self.q: J = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: I = None
        self.w: G = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.w: J = None
        self.p: H = None
        self.y: H = None
        self.z: B = None
        self.s: B = None
        self.x: F = None
        self.t: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: D = None
        self.q: G = None
        self.r: C = None
        self.p: C = None
        self.s: H = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: I = None
        self.w: G = None
        self.x: C = None
        self.o: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: F = None
        self.v: A = None
        self.s: E = None
        self.r: F = None
        self.txt = txt

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

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