class A:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: C = None
        self.r: D = None
        self.t: G = None
        self.u: G = None
        self.y: A = None
        self.v: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: D = None
        self.w: H = None
        self.s: E = None
        self.u: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: G = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: D = None
        self.w: H = None
        self.s: E = None
        self.u: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: G = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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