class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: C = None
        self.y: G = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: D = None
        self.p: B = None
        self.x: G = None
        self.v: B = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: A = None
        self.o: C = None
        self.w: E = None
        self.z: A = None
        self.q: G = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: C = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: C = None
        self.y: G = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: D = None
        self.p: B = None
        self.x: G = None
        self.v: B = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: A = None
        self.o: C = None
        self.w: E = None
        self.z: A = None
        self.q: G = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: C = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: F = None
        self.txt = txt

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

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