class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: C = None
        self.s: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: A = None
        self.o: B = None
        self.x: B = None
        self.txt = txt

m = A("m")
l = B("l")
n = C("n")
f = D("f")
a = E("a")
e = B("e")
i = B("i")
j = C("j")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: A = None
        self.o: B = None
        self.x: B = None
        self.txt = txt

m = A("m")
l = B("l")
n = C("n")
f = D("f")
a = E("a")
e = B("e")
i = B("i")
j = C("j")

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