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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: C = None
        self.r: B = None
        self.u: C = None
        self.s: D = None
        self.x: F = None
        self.txt = txt

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

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

k = A("k")
b = B("b")
d = C("d")
a = D("a")
h = E("h")
g = F("g")
m = G("m")
j = A("j")
f = E("f")
n = F("n")

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: C = None
        self.r: B = None
        self.u: C = None
        self.s: D = None
        self.x: F = None
        self.txt = txt

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

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

k = A("k")
b = B("b")
d = C("d")
a = D("a")
h = E("h")
g = F("g")
m = G("m")
j = A("j")
f = E("f")
n = F("n")

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