class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: E = None
        self.y: B = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: D = None
        self.y: E = None
        self.p: C = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: D = None
        self.p: A = None
        self.q: B = None
        self.v: A = None
        self.txt = txt

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

i = A("i")
b = B("b")
n = C("n")
j = D("j")
h = E("h")
f = D("f")
k = C("k")
m = B("m")
l = A("l")
e = B("e")

i.z = e
i.q = j
b.r = f
b.x = h
b.y = e
b.v = i
n.w = b
n.s = f
n.y = h
n.p = k
n.x = j
j.r = n
j.w = f
j.p = i
j.q = m
j.v = l
h.s = e
h.x = k
f.r = n
f.w = j
f.p = l
f.q = e
f.v = i
k.w = b
k.s = f
k.y = h
k.p = n
k.x = j
m.r = j
m.x = h
m.y = b
m.v = l
l.z = e
l.q = j
e.r = f
e.x = h
e.y = b
e.v = l
assert f.p.q.w.w.r.w.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: E = None
        self.y: B = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: D = None
        self.y: E = None
        self.p: C = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: D = None
        self.p: A = None
        self.q: B = None
        self.v: A = None
        self.txt = txt

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

i = A("i")
b = B("b")
n = C("n")
j = D("j")
h = E("h")
f = D("f")
k = C("k")
m = B("m")
l = A("l")
e = B("e")

i.z = e
i.q = j
b.r = f
b.x = h
b.y = e
b.v = i
n.w = b
n.s = f
n.y = h
n.p = k
n.x = j
j.r = n
j.w = f
j.p = i
j.q = m
j.v = l
h.s = e
h.x = k
f.r = n
f.w = j
f.p = l
f.q = e
f.v = i
k.w = b
k.s = f
k.y = h
k.p = n
k.x = j
m.r = j
m.x = h
m.y = b
m.v = l
l.z = e
l.q = j
e.r = f
e.x = h
e.y = b
e.v = l
assert f.p.q.w.w.r.w.y.txt == "e"