class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: E = None
        self.s: B = None
        self.v: A = None
        self.y: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: C = None
        self.x: C = None
        self.v: B = None
        self.w: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: C = None
        self.x: C = None
        self.v: B = None
        self.w: H = None
        self.txt = txt

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

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

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

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

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