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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

e = A("e")
i = B("i")
n = A("n")
l = A("l")
f = A("f")
a = A("a")

e.v = i
i.p = f
n.v = i
l.v = i
f.v = i
a.v = i
assert i.p.v.p.v.p.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

e = A("e")
i = B("i")
n = A("n")
l = A("l")
f = A("f")
a = A("a")

e.v = i
i.p = f
n.v = i
l.v = i
f.v = i
a.v = i
assert i.p.v.p.v.p.v.txt == "i"