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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: E = None
        self.v: C = None
        self.s: A = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: A = None
        self.o: E = None
        self.x: F = None
        self.z: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: E = None
        self.v: C = None
        self.s: A = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: A = None
        self.o: E = None
        self.x: F = None
        self.z: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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