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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: A = None
        self.u: A = None
        self.r: D = None
        self.txt = txt

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

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

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

d = A("d")
a = B("a")
l = C("l")
n = D("n")
h = E("h")
f = A("f")
m = E("m")
k = D("k")

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: A = None
        self.u: A = None
        self.r: D = None
        self.txt = txt

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

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

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

d = A("d")
a = B("a")
l = C("l")
n = D("n")
h = E("h")
f = A("f")
m = E("m")
k = D("k")

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