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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: H = None
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: B = None
        self.y: A = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: E = None
        self.u: F = None
        self.w: B = None
        self.s: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: H = None
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: B = None
        self.y: A = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: E = None
        self.u: F = None
        self.w: B = None
        self.s: D = None
        self.txt = txt

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

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

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