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

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

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

e = A("e")
a = B("a")
b = C("b")
i = C("i")
l = B("l")
n = A("n")
d = A("d")

e.v = l
e.y = b
e.t = n
a.x = l
a.v = e
a.w = e
b.v = a
b.s = a
i.v = l
i.s = a
l.x = a
l.v = e
l.w = d
n.v = a
n.y = b
n.t = d
d.v = a
d.y = i
d.t = e
assert l.v.v.x.w.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: C = None
        self.t: A = None
        self.txt = txt

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

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

e = A("e")
a = B("a")
b = C("b")
i = C("i")
l = B("l")
n = A("n")
d = A("d")

e.v = l
e.y = b
e.t = n
a.x = l
a.v = e
a.w = e
b.v = a
b.s = a
i.v = l
i.s = a
l.x = a
l.v = e
l.w = d
n.v = a
n.y = b
n.t = d
d.v = a
d.y = i
d.t = e
assert l.v.v.x.w.t.y.txt == "b"