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

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

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

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

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

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

b.r = a
b.o = h
b.t = h
b.y = h
b.w = l
d.w = l
e.v = b
e.s = l
e.t = a
k.v = f
k.s = e
k.w = e
l.z = f
f.v = k
f.s = e
f.w = e
a.v = k
a.s = e
a.w = e
h.r = k
h.o = b
h.t = b
h.y = b
h.w = l
assert b.w.z.v.v.s.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: A = None
        self.t: A = None
        self.w: E = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

b.r = a
b.o = h
b.t = h
b.y = h
b.w = l
d.w = l
e.v = b
e.s = l
e.t = a
k.v = f
k.s = e
k.w = e
l.z = f
f.v = k
f.s = e
f.w = e
a.v = k
a.s = e
a.w = e
h.r = k
h.o = b
h.t = b
h.y = b
h.w = l
assert b.w.z.v.v.s.txt == "e"