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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: F = None
        self.s: E = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: F = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: A = None
        self.v: D = None
        self.s: E = None
        self.w: B = None
        self.z: I = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: B = None
        self.x: F = None
        self.p: A = None
        self.r: H = None
        self.t: I = None
        self.q: I = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: E = None
        self.s: G = None
        self.q: G = None
        self.t: B = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: F = None
        self.s: E = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: F = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: A = None
        self.v: D = None
        self.s: E = None
        self.w: B = None
        self.z: I = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: B = None
        self.x: F = None
        self.p: A = None
        self.r: H = None
        self.t: I = None
        self.q: I = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: E = None
        self.s: G = None
        self.q: G = None
        self.t: B = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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