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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: D = None
        self.p: A = None
        self.t: B = None
        self.w: F = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: D = None
        self.p: A = None
        self.t: B = None
        self.w: F = None
        self.u: E = None
        self.txt = txt

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

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