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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: F = None
        self.q: F = None
        self.t: C = None
        self.w: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: A = None
        self.w: A = None
        self.s: G = None
        self.t: G = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: F = None
        self.q: F = None
        self.t: C = None
        self.w: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: A = None
        self.w: A = None
        self.s: G = None
        self.t: G = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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