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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: C = None
        self.s: H = None
        self.t: D = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: A = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: C = None
        self.w: A = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: F = None
        self.s: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: C = None
        self.s: H = None
        self.t: D = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: A = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: C = None
        self.w: A = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: F = None
        self.s: B = None
        self.txt = txt

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

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

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