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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: E = None
        self.v: D = None
        self.s: F = None
        self.p: H = None
        self.w: H = None
        self.t: E = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: C = None
        self.v: F = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: E = None
        self.p: B = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: E = None
        self.v: D = None
        self.s: F = None
        self.p: H = None
        self.w: H = None
        self.t: E = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: C = None
        self.v: F = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: E = None
        self.p: B = None
        self.u: D = None
        self.txt = txt

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

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