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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: F = None
        self.txt = txt

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

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

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