class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: H = None
        self.o: H = None
        self.w: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: C = None
        self.txt = txt

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

c.s = l
c.p = m
c.o = f
c.w = b
l.p = b
l.q = j
l.u = j
l.w = f
l.x = a
a.v = b
a.x = b
a.p = j
a.z = c
e.q = l
d.z = a
d.q = a
d.o = h
b.v = e
b.w = a
j.p = b
f.v = e
f.z = a
h.v = e
h.z = a
m.v = e
m.z = a
assert d.o.v.q.w.z.z.w.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: H = None
        self.o: H = None
        self.w: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: C = None
        self.txt = txt

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

c.s = l
c.p = m
c.o = f
c.w = b
l.p = b
l.q = j
l.u = j
l.w = f
l.x = a
a.v = b
a.x = b
a.p = j
a.z = c
e.q = l
d.z = a
d.q = a
d.o = h
b.v = e
b.w = a
j.p = b
f.v = e
f.z = a
h.v = e
h.z = a
m.v = e
m.z = a
assert d.o.v.q.w.z.z.w.txt == "b"