class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: B = None
        self.z: C = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: I = None
        self.y: C = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: J = None
        self.z: B = None
        self.t: C = None
        self.r: A = None
        self.s: J = None
        self.y: C = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.o: A = None
        self.w: G = None
        self.y: C = None
        self.q: J = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: H = None
        self.p: C = None
        self.o: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.v: F = None
        self.p: B = None
        self.w: E = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: G = None
        self.v: D = None
        self.o: C = None
        self.t: C = None
        self.x: D = None
        self.y: F = None
        self.w: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: I = None
        self.y: C = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: J = None
        self.z: B = None
        self.t: C = None
        self.r: A = None
        self.s: J = None
        self.y: C = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.o: A = None
        self.w: G = None
        self.y: C = None
        self.q: J = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: H = None
        self.p: C = None
        self.o: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.v: F = None
        self.p: B = None
        self.w: E = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: G = None
        self.v: D = None
        self.o: C = None
        self.t: C = None
        self.x: D = None
        self.y: F = None
        self.w: I = None
        self.txt = txt

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

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