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

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

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

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

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

d = A("d")
k = B("k")
c = C("c")
h = D("h")
f = E("f")
e = B("e")
a = C("a")
l = E("l")
g = D("g")

d.w = l
d.t = f
k.w = e
k.x = e
k.v = a
c.y = f
c.r = a
c.p = l
c.v = h
h.y = f
h.p = f
h.u = g
h.o = k
f.v = e
f.w = g
f.q = g
f.r = d
f.o = d
e.w = k
e.x = k
e.v = a
a.y = f
a.r = c
a.p = l
a.v = h
l.v = e
l.w = h
l.r = d
l.o = d
l.q = g
g.y = f
g.u = h
g.o = k
g.p = l
assert k.v.p.q.u.o.w.w.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: E = None
        self.txt = txt

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

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

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

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

d = A("d")
k = B("k")
c = C("c")
h = D("h")
f = E("f")
e = B("e")
a = C("a")
l = E("l")
g = D("g")

d.w = l
d.t = f
k.w = e
k.x = e
k.v = a
c.y = f
c.r = a
c.p = l
c.v = h
h.y = f
h.p = f
h.u = g
h.o = k
f.v = e
f.w = g
f.q = g
f.r = d
f.o = d
e.w = k
e.x = k
e.v = a
a.y = f
a.r = c
a.p = l
a.v = h
l.v = e
l.w = h
l.r = d
l.o = d
l.q = g
g.y = f
g.u = h
g.o = k
g.p = l
assert k.v.p.q.u.o.w.w.w.w.txt == "k"