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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: B = None
        self.r: A = None
        self.u: F = None
        self.x: F = None
        self.t: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: B = None
        self.r: A = None
        self.u: F = None
        self.x: F = None
        self.t: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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