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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: A = None
        self.y: D = None
        self.u: E = None
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: B = None
        self.z: H = None
        self.u: D = None
        self.o: A = None
        self.t: C = None
        self.r: H = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: E = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: E = None
        self.u: C = None
        self.x: A = None
        self.o: D = None
        self.q: A = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: A = None
        self.y: D = None
        self.u: E = None
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: B = None
        self.z: H = None
        self.u: D = None
        self.o: A = None
        self.t: C = None
        self.r: H = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: E = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: E = None
        self.u: C = None
        self.x: A = None
        self.o: D = None
        self.q: A = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: E = None
        self.txt = txt

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

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