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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: E = None
        self.r: D = None
        self.v: D = None
        self.o: F = None
        self.y: G = None
        self.w: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: G = None
        self.w: E = None
        self.v: G = None
        self.o: G = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: D = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: E = None
        self.r: D = None
        self.v: D = None
        self.o: F = None
        self.y: G = None
        self.w: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: G = None
        self.w: E = None
        self.v: G = None
        self.o: G = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: D = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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