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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: G = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: H = None
        self.t: G = None
        self.w: A = None
        self.s: F = None
        self.x: A = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: E = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: H = None
        self.r: C = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: C = None
        self.u: B = None
        self.x: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: G = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: H = None
        self.t: G = None
        self.w: A = None
        self.s: F = None
        self.x: A = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: E = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: H = None
        self.r: C = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: C = None
        self.u: B = None
        self.x: D = None
        self.txt = txt

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

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