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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: A = None
        self.p: A = None
        self.txt = txt

e = A("e")
n = B("n")
i = C("i")
j = D("j")
a = C("a")
l = C("l")

e.w = j
e.o = a
e.v = i
n.r = i
i.v = e
i.q = a
j.s = l
j.x = e
j.p = e
a.v = e
a.q = i
l.v = e
l.q = i
assert i.q.q.q.v.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: C = None
        self.v: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: A = None
        self.p: A = None
        self.txt = txt

e = A("e")
n = B("n")
i = C("i")
j = D("j")
a = C("a")
l = C("l")

e.w = j
e.o = a
e.v = i
n.r = i
i.v = e
i.q = a
j.s = l
j.x = e
j.p = e
a.v = e
a.q = i
l.v = e
l.q = i
assert i.q.q.q.v.v.v.txt == "e"