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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: H = None
        self.s: D = None
        self.t: C = None
        self.v: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: H = None
        self.v: G = None
        self.t: B = None
        self.x: D = None
        self.s: G = None
        self.txt = txt

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

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

m = A("m")
e = B("e")
j = C("j")
i = D("i")
h = E("h")
a = F("a")
g = G("g")
l = H("l")
k = C("k")

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: H = None
        self.s: D = None
        self.t: C = None
        self.v: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: H = None
        self.v: G = None
        self.t: B = None
        self.x: D = None
        self.s: G = None
        self.txt = txt

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

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

m = A("m")
e = B("e")
j = C("j")
i = D("i")
h = E("h")
a = F("a")
g = G("g")
l = H("l")
k = C("k")

m.v = g
m.z = e
m.s = i
e.x = m
e.w = l
e.s = i
e.t = j
e.v = h
j.s = l
j.t = l
j.r = k
j.o = e
i.q = m
h.x = m
h.r = g
a.r = h
a.o = l
a.v = g
a.s = g
a.t = e
a.x = i
g.r = h
g.q = e
g.w = l
g.z = i
g.o = i
g.u = a
g.t = a
l.p = k
l.w = j
l.s = m
l.t = h
l.z = g
k.s = l
k.t = l
k.r = j
k.o = e
assert k.r.s.z.q.v.r.w.z.txt == "g"