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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: D = None
        self.p: D = None
        self.o: E = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: D = None
        self.p: D = None
        self.o: E = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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