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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: G = None
        self.z: A = None
        self.w: H = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: D = None
        self.o: H = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: G = None
        self.z: A = None
        self.w: H = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: D = None
        self.o: H = None
        self.x: D = None
        self.txt = txt

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

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

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

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