class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: E = None
        self.t: H = None
        self.v: H = None
        self.z: H = None
        self.o: A = None
        self.r: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: A = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: A = None
        self.t: G = None
        self.x: A = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: D = None
        self.w: D = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: F = None
        self.y: E = None
        self.q: E = None
        self.p: F = None
        self.u: A = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: E = None
        self.t: H = None
        self.v: H = None
        self.z: H = None
        self.o: A = None
        self.r: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: A = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: A = None
        self.t: G = None
        self.x: A = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: D = None
        self.w: D = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: F = None
        self.y: E = None
        self.q: E = None
        self.p: F = None
        self.u: A = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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