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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: H = None
        self.y: B = None
        self.o: B = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: H = None
        self.y: B = None
        self.o: B = None
        self.x: C = None
        self.txt = txt

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

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

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

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