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

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

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: B = None
        self.z: G = None
        self.w: A = None
        self.r: D = None
        self.u: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: B = None
        self.z: G = None
        self.w: A = None
        self.r: D = None
        self.u: F = None
        self.txt = txt

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

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

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