class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: B = None
        self.s: G = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: G = None
        self.z: D = None
        self.y: G = None
        self.r: G = None
        self.t: G = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: F = None
        self.t: D = None
        self.q: C = None
        self.y: D = None
        self.r: C = None
        self.z: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: G = None
        self.z: D = None
        self.y: G = None
        self.r: G = None
        self.t: G = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: F = None
        self.t: D = None
        self.q: C = None
        self.y: D = None
        self.r: C = None
        self.z: G = None
        self.txt = txt

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

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