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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: C = None
        self.s: F = None
        self.r: C = None
        self.v: E = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: D = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: F = None
        self.q: H = None
        self.s: G = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: B = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: A = None
        self.w: E = None
        self.y: C = None
        self.s: B = None
        self.q: D = None
        self.r: D = None
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: D = None
        self.s: D = None
        self.txt = txt

h = A("h")
b = B("b")
d = C("d")
n = D("n")
f = E("f")
m = F("m")
a = G("a")
l = H("l")

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: C = None
        self.s: F = None
        self.r: C = None
        self.v: E = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: D = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: F = None
        self.q: H = None
        self.s: G = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: B = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: A = None
        self.w: E = None
        self.y: C = None
        self.s: B = None
        self.q: D = None
        self.r: D = None
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: D = None
        self.s: D = None
        self.txt = txt

h = A("h")
b = B("b")
d = C("d")
n = D("n")
f = E("f")
m = F("m")
a = G("a")
l = H("l")

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