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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: E = None
        self.r: E = None
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: A = None
        self.t: B = None
        self.txt = txt

e = A("e")
l = B("l")
b = C("b")
k = D("k")
h = E("h")
n = A("n")

e.y = h
e.w = n
l.z = b
l.t = h
l.r = h
l.v = h
b.x = l
k.u = b
k.y = b
k.v = h
h.x = b
h.y = e
h.t = l
n.y = h
n.w = e
assert l.t.y.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: E = None
        self.r: E = None
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: A = None
        self.t: B = None
        self.txt = txt

e = A("e")
l = B("l")
b = C("b")
k = D("k")
h = E("h")
n = A("n")

e.y = h
e.w = n
l.z = b
l.t = h
l.r = h
l.v = h
b.x = l
k.u = b
k.y = b
k.v = h
h.x = b
h.y = e
h.t = l
n.y = h
n.w = e
assert l.t.y.w.w.txt == "e"