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

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

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

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

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

j = A("j")
l = B("l")
e = C("e")
n = D("n")
i = E("i")
k = D("k")
m = D("m")
c = E("c")
g = D("g")
a = A("a")

j.v = e
l.y = j
e.w = j
e.z = l
e.x = a
n.p = l
n.u = m
n.r = e
n.z = e
i.v = l
i.r = a
i.t = e
k.p = l
k.u = n
k.r = e
k.z = e
m.p = l
m.u = k
m.r = e
m.z = e
c.v = l
c.r = a
c.t = e
g.p = l
g.u = n
g.r = e
g.z = e
a.v = e
assert e.w.v.z.y.v.x.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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

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

j = A("j")
l = B("l")
e = C("e")
n = D("n")
i = E("i")
k = D("k")
m = D("m")
c = E("c")
g = D("g")
a = A("a")

j.v = e
l.y = j
e.w = j
e.z = l
e.x = a
n.p = l
n.u = m
n.r = e
n.z = e
i.v = l
i.r = a
i.t = e
k.p = l
k.u = n
k.r = e
k.z = e
m.p = l
m.u = k
m.r = e
m.z = e
c.v = l
c.r = a
c.t = e
g.p = l
g.u = n
g.r = e
g.z = e
a.v = e
assert e.w.v.z.y.v.x.v.txt == "e"