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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: E = None
        self.s: F = None
        self.y: G = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: H = None
        self.p: E = None
        self.q: G = None
        self.u: E = None
        self.s: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: C = None
        self.s: C = None
        self.u: G = None
        self.r: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: E = None
        self.p: E = None
        self.s: D = None
        self.txt = txt

h = A("h")
j = B("j")
b = C("b")
e = D("e")
n = E("n")
c = F("c")
d = G("d")
l = H("l")
m = G("m")

h.s = m
h.x = e
j.x = d
j.y = d
j.v = n
j.q = n
j.s = c
b.o = d
b.q = d
b.z = l
b.p = n
b.u = n
b.s = m
e.s = m
e.o = l
e.p = l
e.z = b
e.t = b
e.x = j
e.u = h
e.v = n
n.p = h
n.w = e
n.q = c
n.u = m
n.t = j
n.v = b
n.x = l
c.v = n
c.w = m
d.q = c
d.x = b
d.s = b
d.u = m
d.r = m
l.q = b
l.t = n
l.p = n
l.s = e
m.q = c
m.x = b
m.s = b
m.u = d
m.r = d
assert c.v.x.t.q.v.p.x.z.q.txt == "
class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: E = None
        self.s: F = None
        self.y: G = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: H = None
        self.p: E = None
        self.q: G = None
        self.u: E = None
        self.s: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: C = None
        self.s: C = None
        self.u: G = None
        self.r: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: E = None
        self.p: E = None
        self.s: D = None
        self.txt = txt

h = A("h")
j = B("j")
b = C("b")
e = D("e")
n = E("n")
c = F("c")
d = G("d")
l = H("l")
m = G("m")

h.s = m
h.x = e
j.x = d
j.y = d
j.v = n
j.q = n
j.s = c
b.o = d
b.q = d
b.z = l
b.p = n
b.u = n
b.s = m
e.s = m
e.o = l
e.p = l
e.z = b
e.t = b
e.x = j
e.u = h
e.v = n
n.p = h
n.w = e
n.q = c
n.u = m
n.t = j
n.v = b
n.x = l
c.v = n
c.w = m
d.q = c
d.x = b
d.s = b
d.u = m
d.r = m
l.q = b
l.t = n
l.p = n
l.s = e
m.q = c
m.x = b
m.s = b
m.u = d
m.r = d
assert c.v.x.t.q.v.p.x.z.q.txt == "d"