class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: G = None
        self.z: D = None
        self.x: E = None
        self.y: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: B = None
        self.p: D = None
        self.w: D = None
        self.t: F = None
        self.y: I = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: B = None
        self.o: E = None
        self.r: C = None
        self.v: A = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: B = None
        self.p: D = None
        self.w: D = None
        self.t: F = None
        self.y: I = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: B = None
        self.o: E = None
        self.r: C = None
        self.v: A = None
        self.w: A = None
        self.txt = txt

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

m.v = j
m.p = h
m.z = n
m.x = d
m.y = l
c.y = i
i.y = d
i.v = h
i.w = n
n.w = j
n.y = i
n.t = m
d.q = e
d.x = c
d.p = n
d.w = n
d.t = j
d.v = j
d.y = l
j.o = e
h.w = d
e.z = d
e.p = l
l.y = n
l.z = c
l.o = d
l.r = i
l.v = m
l.w = m
b.y = d
b.v = h
b.w = n
assert n.t.v.o.p.r.w.y.w.txt == "n"