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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: E = None
        self.s: B = None
        self.y: H = None
        self.p: J = None
        self.q: H = None
        self.z: D = None
        self.o: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: A = None
        self.u: J = None
        self.r: F = None
        self.o: B = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: E = None
        self.t: A = None
        self.q: I = None
        self.r: G = None
        self.x: E = None
        self.s: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: G = None
        self.y: F = None
        self.v: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: E = None
        self.s: B = None
        self.y: H = None
        self.p: J = None
        self.q: H = None
        self.z: D = None
        self.o: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: A = None
        self.u: J = None
        self.r: F = None
        self.o: B = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: E = None
        self.t: A = None
        self.q: I = None
        self.r: G = None
        self.x: E = None
        self.s: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: G = None
        self.y: F = None
        self.v: C = None
        self.txt = txt

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

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