class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: D = None
        self.o: C = None
        self.p: E = None
        self.w: E = None
        self.x: H = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: G = None
        self.t: G = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: F = None
        self.z: D = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: G = None
        self.t: G = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: F = None
        self.z: D = None
        self.o: F = None
        self.txt = txt

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

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

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